Fixed warning in mille.

This commit is contained in:
Serge Vakulenko
2014-09-10 20:09:59 -07:00
parent 2da083e9bd
commit d9d91365c0
2 changed files with 3 additions and 4 deletions

View File

@@ -6,7 +6,7 @@ include $(TOPSRC)/target.mk
#include $(TOPSRC)/cross.mk
#CFLAGS = -O -DCROSS -Werror -Wall
#CFLAGS += -Werror -Wall
CFLAGS += -Werror -Wall
OBJS = comp.o end.o extern.o init.o mille.o misc.o move.o print.o \
roll.o save.o types.o varpush.o

View File

@@ -32,7 +32,7 @@ int ac;
char *av[]; {
bool restore;
double avs[3];
unsigned avs[3];
if (strcmp(av[0], "a.out") == 0) {
outf = fopen("q", "w");
@@ -41,8 +41,7 @@ char *av[]; {
}
restore = FALSE;
getloadavg(avs, 3);
if (avs[2] > 4.0) {
if (getloadavg(avs, 3) >= 0 && avs[2] > 400) {
printf("Sorry. The load average is too high.\n");
printf("Please try again later\n");
exit(1);