diff --git a/source/invlib.c b/source/invlib.c index 0a1bc4a..a59858e 100644 --- a/source/invlib.c +++ b/source/invlib.c @@ -497,7 +497,8 @@ 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) { +static +int invflipname(char *invname, const char *from, const char *to) { char *temp, *i = NULL; assert(strlen(from) == strlen(to)); @@ -513,7 +514,8 @@ static int invflipname(char *invname, const char *from, const char *to) { /* small helper function to centralize handling of binary opening * for reading, and use of the 'stat" flag */ -static FILE *open_for_reading(char *name, int stat) { +static +FILE *open_for_reading(char *name, int stat) { return vpfopen(name, ((stat == 0) ? "rb" : "r+b")); } diff --git a/source/main.c b/source/main.c index 266747b..ce73769 100644 --- a/source/main.c +++ b/source/main.c @@ -134,20 +134,19 @@ void cannotwrite(const char *const file) { /* set up the digraph character tables for text compression */ static void initcompress(void) { - int i; - if(compress == true) { - for(i = 0; i < 16; ++i) { + for(int i = 0; i < 16; i++) { dicode1[(unsigned char)(dichar1[i])] = i * 8 + 1; } - for(i = 0; i < 8; ++i) { + for(int i = 0; i < 8; i++) { dicode2[(unsigned char)(dichar2[i])] = i + 1; } } } /* skip the list in the cross-reference file */ -static void skiplist(FILE *oldrefs) { +static +void skiplist(FILE *oldrefs) { int i; if(fscanf(oldrefs, "%d", &i) != 1) { diff --git a/source/path.c b/source/path.c index 4f6f6e1..74b3883 100644 --- a/source/path.c +++ b/source/path.c @@ -41,7 +41,7 @@ const char *basename(const char *path) { const char *s; if((s = strrchr(path, '/')) != 0) { return (s + 1); } - return (path); + return path; } /* get the requested path components */