Removed void casts for ignored return values of function calls.
[mmh] / sbr / getpass.c
index 14f2242..3fd4528 100644 (file)
@@ -66,12 +66,12 @@ nmh_getpass(const char *prompt)
                fout = stderr;
                fin = stdin;
        } else {  /* Reading directly from terminal here */
-               (void)tcgetattr(fileno(fin), &oterm);
+               tcgetattr(fileno(fin), &oterm);
                term = oterm; /* Save original info */
                term.c_lflag &= ~ECHO;
-               (void)fputs(prompt, fout);
+               fputs(prompt, fout);
                rewind(fout);  /* implied flush */
-               (void)tcsetattr(fileno(fin), TCSANOW, &term);
+               tcsetattr(fileno(fin), TCSANOW, &term);
        }
 
        for (p = buf; (ch = getc(fin)) != EOF && ch != '\n' &&
@@ -80,10 +80,10 @@ nmh_getpass(const char *prompt)
        *p = '\0';
 
        if (istty) {
-               (void)tcsetattr(fileno(fin), TCSANOW, &oterm);
+               tcsetattr(fileno(fin), TCSANOW, &oterm);
                rewind(fout);
-               (void)fputc('\n', fout);
-               (void)fclose(fin);
+               fputc('\n', fout);
+               fclose(fin);
        }
        return buf;
 }