whitespace fixes

This commit is contained in:
Hiltjo Posthuma 2015-03-27 22:47:15 +01:00
parent 8e486d5282
commit 1e0c3a0ba6
2 changed files with 11 additions and 11 deletions

4
grep.c
View File

@ -193,7 +193,7 @@ main(int argc, char *argv[])
break; break;
case 'e': case 'e':
arg = EARGF(usage()); arg = EARGF(usage());
if(!(fp = fmemopen(arg, strlen(arg) + 1, "r"))) if (!(fp = fmemopen(arg, strlen(arg) + 1, "r")))
eprintf("fmemopen:"); eprintf("fmemopen:");
addpatternfile(fp); addpatternfile(fp);
fclose(fp); fclose(fp);
@ -243,7 +243,7 @@ main(int argc, char *argv[])
/* just add literal pattern to list */ /* just add literal pattern to list */
if (!eflag && !fflag) { if (!eflag && !fflag) {
if(!(fp = fmemopen(argv[0], strlen(argv[0]) + 1, "r"))) if (!(fp = fmemopen(argv[0], strlen(argv[0]) + 1, "r")))
eprintf("fmemopen:"); eprintf("fmemopen:");
addpatternfile(fp); addpatternfile(fp);
fclose(fp); fclose(fp);

18
uniq.c
View File

@ -57,15 +57,15 @@ uniqline(FILE *ofp, const char *l, size_t len)
prevoffset = NULL; prevoffset = NULL;
} }
if (l) { if (l) {
if (!prevline || len >= prevlinesiz) { if (!prevline || len >= prevlinesiz) {
prevlinesiz = len + 1; prevlinesiz = len + 1;
prevline = erealloc(prevline, prevlinesiz); prevline = erealloc(prevline, prevlinesiz);
} }
memcpy(prevline, l, len); memcpy(prevline, l, len);
prevline[len] = '\0'; prevline[len] = '\0';
prevoffset = prevline + (loffset - l); prevoffset = prevline + (loffset - l);
} }
prevlinecount = 1; prevlinecount = 1;
} }