From cffb1763b41cad21c498fbb522dc86a9e531d3dc Mon Sep 17 00:00:00 2001 From: anon Date: Sun, 10 Nov 2024 13:00:51 +0100 Subject: [PATCH] remove useless new lines --- source/build.c | 1 - source/dir.c | 2 -- source/exec.c | 1 - source/invlib.c | 1 - source/main.c | 1 - source/opt.c | 1 - source/path.c | 6 ------ 7 files changed, 13 deletions(-) diff --git a/source/build.c b/source/build.c index de92405..569196c 100644 --- a/source/build.c +++ b/source/build.c @@ -53,7 +53,6 @@ #endif /* Exported variables: */ - bool buildonly = false; /* only build the database */ bool unconditional = false; /* unconditionally build database */ bool fileschanged; /* assume some files changed */ diff --git a/source/dir.c b/source/dir.c index e65e64d..0e7764b 100644 --- a/source/dir.c +++ b/source/dir.c @@ -608,7 +608,6 @@ char *inviewpath(char *file) { } /* add a source file to the list */ - void addsrcfile(char *path) { struct listitem *p; int i; @@ -628,7 +627,6 @@ void addsrcfile(char *path) { } /* free the memory allocated for the source file list */ - void freefilelist(void) { struct listitem *p, *nextp; int i; diff --git a/source/exec.c b/source/exec.c index 54834b0..d9abb77 100644 --- a/source/exec.c +++ b/source/exec.c @@ -144,7 +144,6 @@ static pid_t myfork(void) { } /* join is the compliment of fork */ - static int join(pid_t p) { int status = -1; pid_t w; diff --git a/source/invlib.c b/source/invlib.c index 7c982b6..3dd2c7f 100644 --- a/source/invlib.c +++ b/source/invlib.c @@ -497,7 +497,6 @@ static int invnewterm(void) { * 'to' substring (which must be of the exact same length), and the function * returns 0. Otherwise, returns -1. */ - static int invflipname(char *invname, const char *from, const char *to) { char *temp, *i = NULL; diff --git a/source/main.c b/source/main.c index fce98ae..13bfa39 100644 --- a/source/main.c +++ b/source/main.c @@ -148,7 +148,6 @@ static void initcompress(void) { } /* skip the list in the cross-reference file */ - static void skiplist(FILE *oldrefs) { int i; diff --git a/source/opt.c b/source/opt.c index ffe1b6a..0ca4c37 100644 --- a/source/opt.c +++ b/source/opt.c @@ -86,7 +86,6 @@ char **parse_options(int *argc, char **argv) { lopts, &longind)) != -1) { switch(opt) { - case '?': usage(); myexit(1); diff --git a/source/path.c b/source/path.c index c5fc1ce..4f6f6e1 100644 --- a/source/path.c +++ b/source/path.c @@ -81,20 +81,17 @@ char *compress_path(char *pathname) /*FDEF*/ /* * do not change the path if it has no "/" */ - if(strchr(pathname, '/') == NULL) return (pathname); /* * find all strings consisting of more than one '/' */ - for(lastchar = pathname + 1; *lastchar != '\0'; lastchar++) if((*lastchar == '/') && (*(lastchar - 1) == '/')) { /* * find the character after the last slash */ - nextchar = lastchar; while(*++lastchar == '/') { } @@ -102,7 +99,6 @@ char *compress_path(char *pathname) /*FDEF*/ * eliminate the extra slashes by copying * everything after the slashes over the slashes */ - sofar = nextchar; while((*nextchar++ = *lastchar++) != '\0') ; @@ -112,7 +108,6 @@ char *compress_path(char *pathname) /*FDEF*/ /* * find all strings of "./" */ - for(lastchar = pathname + 1; *lastchar != '\0'; lastchar++) if((*lastchar == '/') && (*(lastchar - 1) == '.') && ((lastchar - 1 == pathname) || (*(lastchar - 2) == '/'))) { @@ -120,7 +115,6 @@ char *compress_path(char *pathname) /*FDEF*/ /* * copy everything after the "./" over the "./" */ - nextchar = lastchar - 1; sofar = nextchar; while((*nextchar++ = *++lastchar) != '\0')