comparison 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
comparison
equal deleted inserted replaced
284:6376b514a30b 285:17005af49963
179 printf("Your terminal has %d lines, needs 22.\n",LINES); 179 printf("Your terminal has %d lines, needs 22.\n",LINES);
180 endwin(); 180 endwin();
181 exit(1); 181 exit(1);
182 } 182 }
183 183
184 if ((whoami == NULL) || (*whoami == '\0') || (strcmp(whoami,"dosuser")==0)) 184 if ((*whoami == '\0') || (strcmp(whoami,"dosuser")==0))
185 { 185 {
186 echo(); 186 echo();
187 mvaddstr(23,2,"Rogue's Name? "); 187 mvaddstr(23,2,"Rogue's Name? ");
188 wgetnstr(stdscr,whoami,MAXSTR); 188 wgetnstr(stdscr,whoami,MAXSTR);
189 noecho(); 189 noecho();
190 } 190 }
191 191
192 if ((whoami == NULL) || (*whoami == '\0')) 192 if (*whoami == '\0')
193 strcpy(whoami,"Rodney"); 193 strcpy(whoami,"Rodney");
194 194
195 setup(); 195 setup();
196 196
197 /* 197 /*