comparison srogue/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 0250220d8cdd
comparison
equal deleted inserted replaced
284:6376b514a30b 285:17005af49963
199 endwin(); 199 endwin();
200 printf("ERROR: screen size too small\n"); 200 printf("ERROR: screen size too small\n");
201 byebye(1); 201 byebye(1);
202 } 202 }
203 203
204 if ((whoami == NULL) || (*whoami == '\0') || (strcmp(whoami,"dosuser")==0)) 204 if ((*whoami == '\0') || (strcmp(whoami,"dosuser")==0))
205 { 205 {
206 echo(); 206 echo();
207 mvaddstr(23,2,"Rogue's Name? "); 207 mvaddstr(23,2,"Rogue's Name? ");
208 wgetnstr(stdscr,whoami,MAXSTR); 208 wgetnstr(stdscr,whoami,MAXSTR);
209 noecho(); 209 noecho();
210 } 210 }
211 211
212 if ((whoami == NULL) || (*whoami == '\0')) 212 if (*whoami == '\0')
213 strcpy(whoami,"Rodney"); 213 strcpy(whoami,"Rodney");
214 214
215 setup(); 215 setup();
216 216
217 /* Set up windows */ 217 /* Set up windows */