--- usr.bin/fortune/fortune/fortune.orig.c 2020-03-19 02:25:53.655681000 -0500 +++ usr.bin/fortune/fortune/fortune.c 2020-03-19 12:58:36.098855794 -0500 @@ -99,7 +99,6 @@ static bool Found_one; /* did we find a match? */ static bool Find_files = FALSE; /* just find a list of proper fortune files */ -static bool Fortunes_only = FALSE; /* check only "fortunes" files */ static bool Wait = FALSE; /* wait desired after fortune */ static bool Short_only = FALSE; /* short fortune desired */ static bool Long_only = FALSE; /* long fortune desired */ @@ -366,33 +365,17 @@ char **pstr; if (file_cnt == 0) { - if (Find_files) { - Fortunes_only = TRUE; - pstr = Fortune_path_arr; - i = 0; - while (*pstr) { - i += add_file(NO_PROB, *pstr++, NULL, - &File_list, &File_tail, NULL); - } - Fortunes_only = FALSE; - if (!i) { - fprintf(stderr, "No fortunes found in %s.\n", - Fortune_path); - } - return (i != 0); - } else { - pstr = Fortune_path_arr; - i = 0; - while (*pstr) { - i += add_file(NO_PROB, "fortunes", *pstr++, - &File_list, &File_tail, NULL); - } - if (!i) { - fprintf(stderr, "No fortunes found in %s.\n", - Fortune_path); - } - return (i != 0); + pstr = Fortune_path_arr; + i = 0; + while (*pstr) { + i += add_file(NO_PROB, *pstr++, NULL, + &File_list, &File_tail, NULL); } + if (!i) { + fprintf(stderr, "No fortunes found in %s.\n", + Fortune_path); + } + return (i != 0); } for (i = 0; i < file_cnt; i++) { percent = NO_PROB; @@ -789,10 +772,6 @@ DPRINTF(2, (stderr, "FALSE (file starts with '.')\n")); return (FALSE); } - if (Fortunes_only && strncmp(sp, "fortunes", 8) != 0) { - DPRINTF(2, (stderr, "FALSE (check fortunes only)\n")); - return (FALSE); - } if ((sp = strrchr(sp, '.')) != NULL) { sp++; for (i = 0; suflist[i] != NULL; i++)