diff options
author | Topi Miettinen <toiwoton@gmail.com> | 2019-01-05 20:37:34 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-01-12 16:02:26 +0100 |
commit | 7ae3561a5a6c85b080808335f0dd8f137acd5ba8 (patch) | |
tree | b03da7c5056c7009763b64f1ce92419832dbc94d /src/nss-resolve | |
parent | 899072c0cd2edcb29bcaed81414ae86b2363f2bc (diff) | |
download | systemd-7ae3561a5a6c85b080808335f0dd8f137acd5ba8.tar.gz |
Delete duplicate lines
Found by inspecting results of running this small program:
int main(int argc, const char **argv) {
for (int i = 1; i < argc; i++) {
FILE *f;
char line[1024], prev[1024], *r;
int lineno;
prev[0] = '\0';
lineno = 1;
f = fopen(argv[i], "r");
if (!f)
exit(1);
do {
r = fgets(line, sizeof(line), f);
if (!r)
break;
if (strcmp(line, prev) == 0)
printf("%s:%d: error: dup %s", argv[i], lineno, line);
lineno++;
strcpy(prev, line);
} while (!feof(f));
fclose(f);
}
}
Diffstat (limited to 'src/nss-resolve')
0 files changed, 0 insertions, 0 deletions