sha1_file: teach packed_object_info about typename
[gitweb.git] / grep.c
diff --git a/grep.c b/grep.c
index 2d54baeaa30a2a9686d49157c859f163ad29a2ff..d03d424e5cf8d32d91e3082555d8add674e01486 100644 (file)
--- a/grep.c
+++ b/grep.c
@@ -321,6 +321,18 @@ static NORETURN void compile_regexp_failed(const struct grep_pat *p,
        die("%s'%s': %s", where, p->pattern, error);
 }
 
+static int is_fixed(const char *s, size_t len)
+{
+       size_t i;
+
+       for (i = 0; i < len; i++) {
+               if (is_regex_special(s[i]))
+                       return 0;
+       }
+
+       return 1;
+}
+
 static int has_null(const char *s, size_t len)
 {
        /*
@@ -402,18 +414,6 @@ static void free_pcre1_regexp(struct grep_pat *p)
 }
 #endif /* !USE_LIBPCRE1 */
 
-static int is_fixed(const char *s, size_t len)
-{
-       size_t i;
-
-       for (i = 0; i < len; i++) {
-               if (is_regex_special(s[i]))
-                       return 0;
-       }
-
-       return 1;
-}
-
 static void compile_fixed_regexp(struct grep_pat *p, struct grep_opt *opt)
 {
        struct strbuf sb = STRBUF_INIT;