]> granicus.if.org Git - fortune-mod/commitdiff
refactoring: remove unhelpful debugprints
authorShlomi Fish <shlomif@shlomifish.org>
Fri, 22 Oct 2021 08:37:44 +0000 (11:37 +0300)
committerShlomi Fish <shlomif@shlomifish.org>
Fri, 22 Oct 2021 08:37:44 +0000 (11:37 +0300)
fortune-mod/fortune/fortune.c

index 5d73ff90d94603446d85fc38f2a9c54fa6876013..9bf165eba50e3b3b8342469e9d59eba1bee83071 100644 (file)
@@ -581,7 +581,7 @@ static int add_file(int percent, const char *file, const char *dir,
             ((fd = open4read(path)) < 0)) ||
         !path_is_absolute(path))
     {
-        debugprint("sarahhhhh fd=%d path=<%s> dir=<%s> file=<%s> percent=%d\n",
+        debugprint("check file fd=%d path=<%s> dir=<%s> file=<%s> percent=%d\n",
             fd, path, dir, file, percent);
         bool found = false;
         if (!dir && (!strchr(file, '/')))
@@ -640,13 +640,11 @@ static int add_file(int percent, const char *file, const char *dir,
                 }
                 if (!ret)
                 {
-                    debugprint("moshe\n");
                     perror(path);
                 }
             }
             else
             {
-                debugprint("abe\n");
                 perror(path);
             }
         }
@@ -755,7 +753,6 @@ static int add_dir(FILEDESC *const fp)
     fp->fd = -1;
     if (!(dir = opendir(fp->path)))
     {
-        debugprint("yonah\n");
         perror(fp->path);
         return false;
     }
@@ -767,7 +764,6 @@ static int add_dir(FILEDESC *const fp)
     names = malloc(sizeof(names[0]) * max_count_names);
     if (!names)
     {
-        debugprint("zach\n");
         perror("Out of RAM!");
         exit(-1);
     }
@@ -782,7 +778,6 @@ static int add_dir(FILEDESC *const fp)
             names = realloc(names, sizeof(names[0]) * max_count_names);
             if (!names)
             {
-                debugprint("rebecca\n");
                 perror("Out of RAM!");
                 exit(-1);
             }