diff arogue5/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 d3968e9cb98d
children e52a8a7ad4c5
line wrap: on
line diff
--- a/arogue5/main.c	Fri Sep 22 16:24:40 2017 -0400
+++ b/arogue5/main.c	Sat Sep 23 09:47:00 2017 -0400
@@ -200,8 +200,7 @@
     }
 
     if (!use_savedir) {
-        if ((whoami == NULL) || (*whoami == '\0') || 
-            (strcmp(whoami,"dosuser")==0))
+        if ((*whoami == '\0') || (strcmp(whoami,"dosuser")==0))
         {
             echo();
             mvaddstr(23,2,"Rogue's Name? ");
@@ -209,7 +208,7 @@
             noecho();
         }
 
-        if ((whoami == NULL) || (*whoami == '\0'))
+        if (*whoami == '\0')
             strcpy(whoami,"Rodney");
     }