Skip to content

Commit

Permalink
Ignore fgets return value with using void
Browse files Browse the repository at this point in the history
  • Loading branch information
orhun committed Aug 10, 2020
1 parent 4a28d19 commit 9d08c49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/zps.c
Expand Up @@ -293,7 +293,7 @@ static int killProcByPPID(int PPID, int terminated) {
static int showPrompt() {
/* Print user input message and ask for input. */
fprintf(stderr, "\nEnter process index(es) to proceed: ");
(void) fgets(indexPrompt, sizeof(indexPrompt), stdin);
(void)fgets(indexPrompt, sizeof(indexPrompt), stdin);
/* Remove trailing newline character from input. */
indexPrompt[strcspn(indexPrompt, "\n")] = 0;
char* indexStr = indexPrompt; /* Duplicate the input string */
Expand Down

0 comments on commit 9d08c49

Please sign in to comment.