summaryrefslogtreecommitdiff
path: root/builtin/check-attr.c
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2017-01-28 02:02:04 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-02-01 21:46:53 (GMT)
commite810e0635767afbc9b304d5256fbdb26b59644fa (patch)
tree22565ccc823a22ec95e1bf937a7a8150bf52c79f /builtin/check-attr.c
parent60a12722ac80bc55b43581a7719d25d1bb7a9882 (diff)
downloadgit-e810e0635767afbc9b304d5256fbdb26b59644fa.zip
git-e810e0635767afbc9b304d5256fbdb26b59644fa.tar.gz
git-e810e0635767afbc9b304d5256fbdb26b59644fa.tar.bz2
attr: tighten const correctness with git_attr and match_attr
Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/check-attr.c')
-rw-r--r--builtin/check-attr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/check-attr.c b/builtin/check-attr.c
index 40cdff1..4d01ca0 100644
--- a/builtin/check-attr.c
+++ b/builtin/check-attr.c
@@ -166,7 +166,8 @@ int cmd_check_attr(int argc, const char **argv, const char *prefix)
check = attr_check_alloc();
if (!all_attrs) {
for (i = 0; i < cnt; i++) {
- struct git_attr *a = git_attr(argv[i]);
+ const struct git_attr *a = git_attr(argv[i]);
+
if (!a)
return error("%s: not a valid attribute name",
argv[i]);