diff rogue4/main.c @ 285:17005af49963

Fix some potential problems detected by clang. Most of these are unnecessary comparisons and functions returning the wrong types.
author John "Elwin" Edwards
date Sat, 23 Sep 2017 09:47:00 -0400
parents 3d4252fa2ed3
children
line wrap: on
line diff
--- a/rogue4/main.c	Fri Sep 22 16:24:40 2017 -0400
+++ b/rogue4/main.c	Sat Sep 23 09:47:00 2017 -0400
@@ -181,7 +181,7 @@
         exit(1); 
     } 
  
-    if ((whoami == NULL) || (*whoami == '\0') || (strcmp(whoami,"dosuser")==0))
+    if ((*whoami == '\0') || (strcmp(whoami,"dosuser")==0))
     {
         echo();
         mvaddstr(23,2,"Rogue's Name? ");
@@ -189,7 +189,7 @@
         noecho();
     }
 
-    if ((whoami == NULL) || (*whoami == '\0'))
+    if (*whoami == '\0')
         strcpy(whoami,"Rodney");
 
     setup();