Fix warnings about ignoring fgets return value
[openssl.git] / apps / openssl.c
index c9d9fe9288de970f34eade8b3b47a19dfa61ea73..851e63973581fc191c42ad418154769dae01ecc5 100644 (file)
@@ -330,7 +330,8 @@ int main(int Argc, char *Argv[])
                        else    prompt="OpenSSL> ";
                        fputs(prompt,stdout);
                        fflush(stdout);
                        else    prompt="OpenSSL> ";
                        fputs(prompt,stdout);
                        fflush(stdout);
-                       fgets(p,n,stdin);
+                       if (!fgets(p,n,stdin))
+                               goto end;
                        if (p[0] == '\0') goto end;
                        i=strlen(p);
                        if (i <= 1) break;
                        if (p[0] == '\0') goto end;
                        i=strlen(p);
                        if (i <= 1) break;