From fbca58373291afa07c5b30ab562d36ce0f6174e0 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 27 Jun 2008 18:21:56 +0200 Subject: Move parse-options's skip_prefix() to git-compat-util.h builtin-remote.c and parse-options.c both have a skip_prefix() function, for the same purpose. Move parse-options's one to git-compat-util.h and let builtin-remote use it as well. Signed-off-by: Miklos Vajna Signed-off-by: Junio C Hamano --- parse-options.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'parse-options.c') diff --git a/parse-options.c b/parse-options.c index b8bde2b04a..bbc3ca4a9f 100644 --- a/parse-options.c +++ b/parse-options.c @@ -22,12 +22,6 @@ static inline const char *get_arg(struct optparse_t *p) return *++p->argv; } -static inline const char *skip_prefix(const char *str, const char *prefix) -{ - size_t len = strlen(prefix); - return strncmp(str, prefix, len) ? NULL : str + len; -} - static int opterror(const struct option *opt, const char *reason, int flags) { if (flags & OPT_SHORT) -- cgit v1.2.3