]> granicus.if.org Git - fortune-mod/commitdiff
minor refactoring: static+const
authorShlomi Fish <shlomif@shlomifish.org>
Mon, 27 Sep 2021 07:03:11 +0000 (10:03 +0300)
committerShlomi Fish <shlomif@shlomifish.org>
Mon, 27 Sep 2021 07:03:11 +0000 (10:03 +0300)
fortune-mod/fortune/fortune.c

index 2f201eaaee3dde95c157ce025ada32e69ee11d4b..2e12faf04baa020dc7142de884dd2ce535ce1b11 100644 (file)
@@ -195,7 +195,7 @@ static inline char *my_recode_string(const char *s)
 static inline char *my_recode_string(const char *s) { return strdup(s); }
 #endif
 
-int add_dir(FILEDESC *);
+static int add_dir(FILEDESC *);
 
 static unsigned long my_random(const unsigned long base)
 {
@@ -738,7 +738,7 @@ static int names_compare(const void *a, const void *b)
  * add_dir:
  *      Add the contents of an entire directory.
  */
-int add_dir(FILEDESC *fp)
+static int add_dir(FILEDESC *const fp)
 {
     DIR *dir;
     struct dirent *dirent;