]> asedeno.scripts.mit.edu Git - git.git/blobdiff - xdiff-interface.c
Merge branch 'tr/gcov'
[git.git] / xdiff-interface.c
index e8ef46d10dc53a1ee1781d07685984734bc3160f..b9b0db8d86615d6ca1046b932772f3d9750a8062 100644 (file)
@@ -15,11 +15,10 @@ static int parse_num(char **cp_p, int *num_p)
 {
        char *cp = *cp_p;
        int num = 0;
-       int read_some;
 
        while ('0' <= *cp && *cp <= '9')
                num = num * 10 + *cp++ - '0';
-       if (!(read_some = cp - *cp_p))
+       if (!(cp - *cp_p))
                return -1;
        *cp_p = cp;
        *num_p = num;
@@ -254,16 +253,6 @@ static long ff_regexp(const char *line, long len,
 
        line_buffer = xstrndup(line, len); /* make NUL terminated */
 
-       /* Exclude terminating newline (and cr) from matching */
-       if (len > 0 && line[len-1] == '\n') {
-               if (len > 1 && line[len-2] == '\r')
-                       len -= 2;
-               else
-                       len--;
-       }
-
-       line_buffer = xstrndup(line, len); /* make NUL terminated */
-
        for (i = 0; i < regs->nr; i++) {
                struct ff_reg *reg = regs->array + i;
                if (!regexec(&reg->re, line_buffer, 2, pmatch, 0)) {
@@ -338,4 +327,3 @@ int git_xmerge_config(const char *var, const char *value, void *cb)
        }
        return git_default_config(var, value, cb);
 }
-