* Copyright (C) Linus Torvalds, 2005
*/
#include "cache.h"
-#include <ctype.h>
static char *diff_cmd = "diff -L '%s' -u -N - '%s'";
int cnt, c;
char *cp;
- /* count single quote characters */
- for (cnt = 0, cp = src; *cp; cnt++, cp++)
+ /* count bytes needed to store the quoted string. */
+ for (cnt = 1, cp = src; *cp; cnt++, cp++)
if (*cp == '\'')
cnt += 3;