comparison xrogue/state.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 6376b514a30b
children e52a8a7ad4c5
comparison
equal deleted inserted replaced
284:6376b514a30b 285:17005af49963
3150 #else 3150 #else
3151 return(range <= 0 ? 0 : random() % range); 3151 return(range <= 0 ? 0 : random() % range);
3152 #endif 3152 #endif
3153 } 3153 }
3154 3154
3155 int 3155 void
3156 md_srand(int seed) 3156 md_srand(int seed)
3157 { 3157 {
3158 #ifdef _WIN32 3158 #ifdef _WIN32
3159 srand(seed); 3159 srand(seed);
3160 #else 3160 #else
3596 nonl(); 3596 nonl();
3597 crmode(); /* Cbreak mode */ 3597 crmode(); /* Cbreak mode */
3598 noecho(); /* Echo off */ 3598 noecho(); /* Echo off */
3599 } 3599 }
3600 3600
3601 int 3601 void
3602 md_normaluser(void) 3602 md_normaluser(void)
3603 { 3603 {
3604 #ifndef _WIN32 3604 #ifndef _WIN32
3605 setuid(getuid()); 3605 setuid(getuid());
3606 setgid(getgid()); 3606 setgid(getgid());