summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9360f27)
raw | patch | inline | side by side (parent: 9360f27)
author | Junio C Hamano <junkio@cox.net> | |
Tue, 20 Feb 2007 09:51:22 +0000 (01:51 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 21 Feb 2007 06:03:14 +0000 (22:03 -0800) |
We have too many strncmp(a, b, strlen(b)).
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-compat-util.h | patch | blob | history |
diff --git a/git-compat-util.h b/git-compat-util.h
index 9863cf671f7522f73ea5a88af0d1234488c73396..d027c36b97510eec59be9299bb306e87469ae6ab 100644 (file)
--- a/git-compat-util.h
+++ b/git-compat-util.h
return x;
}
+static inline int prefixcmp(const char *str, const char *prefix)
+{
+ return strncmp(str, prefix, strlen(prefix));
+}
+
#endif