diff --git a/mbtask/outstat.c b/mbtask/outstat.c index 0cbbc609..5e8cf883 100644 --- a/mbtask/outstat.c +++ b/mbtask/outstat.c @@ -123,7 +123,7 @@ void set_next(int hour, int min) #if defined(__OpenBSD__) gmtime_r(&now, &etm); #else - etm = gmtime(&now); + etm = *gmtime(&now); #endif uhour = etm.tm_hour; /* For some reason, these intermediate integers are needed */ umin = etm.tm_min; diff --git a/mbtask/taskutil.c b/mbtask/taskutil.c index 28fff6c7..2f6412d3 100644 --- a/mbtask/taskutil.c +++ b/mbtask/taskutil.c @@ -272,7 +272,7 @@ void CreateSema(char *sem) sprintf(temp, "%s/var/sema/%s", getenv("MBSE_ROOT"), sem); if (access(temp, F_OK) == 0) return; - if ((fp = fopen(temp, "w"))) { + if ((fp = fopen(temp, "w"))) fclose(fp); else Syslog('?', "Can't create semafore %s", temp); @@ -286,9 +286,9 @@ void TouchSema(char *sem) FILE *fp; sprintf(temp, "%s/var/sema/%s", getenv("MBSE_ROOT"), sem); - if ((fp = fopen(temp, "w"))) { + if ((fp = fopen(temp, "w"))) fclose(fp); - } else + else Syslog('?', "Can't touch semafore %s", temp); }