Mercurial > hg > early-roguelike
comparison 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 |
comparison
equal
deleted
inserted
replaced
284:6376b514a30b | 285:17005af49963 |
---|---|
198 printf("\nERROR: screen size to small for rogue\n"); | 198 printf("\nERROR: screen size to small for rogue\n"); |
199 byebye(-1); | 199 byebye(-1); |
200 } | 200 } |
201 | 201 |
202 if (!use_savedir) { | 202 if (!use_savedir) { |
203 if ((whoami == NULL) || (*whoami == '\0') || | 203 if ((*whoami == '\0') || (strcmp(whoami,"dosuser")==0)) |
204 (strcmp(whoami,"dosuser")==0)) | |
205 { | 204 { |
206 echo(); | 205 echo(); |
207 mvaddstr(23,2,"Rogue's Name? "); | 206 mvaddstr(23,2,"Rogue's Name? "); |
208 wgetnstr(stdscr,whoami,LINELEN); | 207 wgetnstr(stdscr,whoami,LINELEN); |
209 noecho(); | 208 noecho(); |
210 } | 209 } |
211 | 210 |
212 if ((whoami == NULL) || (*whoami == '\0')) | 211 if (*whoami == '\0') |
213 strcpy(whoami,"Rodney"); | 212 strcpy(whoami,"Rodney"); |
214 } | 213 } |
215 | 214 |
216 setup(); | 215 setup(); |
217 /* | 216 /* |