From 871fe1b311145129f42dc1a4b97f70e9f6d2dbf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Fri, 23 Jul 2021 23:47:53 +0200 Subject: Remove superfluous comments --- name.c | 12 +++--------- re.c | 1 - 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/name.c b/name.c index d2a4f61..fce3fba 100644 --- a/name.c +++ b/name.c @@ -6,9 +6,9 @@ #include #include -#define MAXFILES 100 /* Maximum number of files. */ -#define MAXFILE 255 /* Maximum file name length. */ -#define MAXLINE MAXFILE+1 /* MAXFILE plus newline. */ +#define MAXFILES 100 +#define MAXFILE 255 +#define MAXLINE MAXFILE+1 extern char *optarg; extern int optind; @@ -23,7 +23,6 @@ main(int argc, char *argv[]) FILE *fp; int c, i, j, s, xflag; - /* Allocate memory. */ for(i = 0; i < MAXFILES; i++) if(!(froms[i] = malloc(MAXFILE)) || !(tos[i] = malloc(MAXFILE))) err(1, "malloc"); @@ -42,7 +41,6 @@ main(int argc, char *argv[]) return 1; } - /* Read command-line options. */ name = argv[0]; xflag = 0; while((c = getopt(argc, argv, "x")) != -1) @@ -81,10 +79,6 @@ usage: fprintf(stderr, "usage: %s [-x]\n", name); return 1; } - /* - * The corresponding mv invocations are printed on standard out. - * If the -x flag is given, they are executed too. - */ for(i = 0; i < j; i++){ escape(froms[i], &tmp); printf("mv -- '%s'", tmp); escape(tos[i], &tmp); printf(" '%s'\n", tmp); diff --git a/re.c b/re.c index f4aeca8..f42f16b 100644 --- a/re.c +++ b/re.c @@ -14,7 +14,6 @@ main(int argc, char *argv[]) return 1; } - /* Ensure arguments do not contain newlines. */ for(i = 1; i < argc; i++) for(a = argv[i]; *a; a++) if(*a == '\n'){ -- cgit v1.2.3