summaryrefslogtreecommitdiff
path: root/builtin/apply.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2014-10-04 20:54:50 +0200
committerJunio C Hamano <gitster@pobox.com>2014-10-07 11:09:16 -0700
commite3f1da982e4f14e7146964cb25a5011a3f41e84a (patch)
tree0b225c25e7b86a7a49b58f4fa4af500c5c36b40a /builtin/apply.c
parent565301e41670825ceedf75220f2918ae76831240 (diff)
downloadgit-e3f1da982e4f14e7146964cb25a5011a3f41e84a.tar.gz
use skip_prefix() to avoid more magic numbersrs/more-uses-of-skip-prefix
Continue where ae021d87 (use skip_prefix to avoid magic numbers) left off and use skip_prefix() in more places for determining the lengths of prefix strings to avoid using dependent constants and other indirect methods. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/apply.c')
-rw-r--r--builtin/apply.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/apply.c b/builtin/apply.c
index 8714a88720..97f7e8e499 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -435,7 +435,7 @@ static unsigned long linelen(const char *buffer, unsigned long size)
static int is_dev_null(const char *str)
{
- return !memcmp("/dev/null", str, 9) && isspace(str[9]);
+ return skip_prefix(str, "/dev/null", &str) && isspace(*str);
}
#define TERM_SPACE 1