interpret, we always need to check its return value, and in the case it's NULL
then error and exit before proceeding further otherwise in this specific
program we would find a null dereference down the road which would make the
program segfault.
OK cheloha@
prev = usr.ut_time;
if (Flags & AC_D) {
ltm = localtime(&usr.ut_time);
+ if (ltm == NULL)
+ err(1, "localtime");
if (day >= 0 && day != ltm->tm_yday) {
day = ltm->tm_yday;
/*
if (Flags & AC_D) {
ltm = localtime(&usr.ut_time);
+ if (ltm == NULL)
+ err(1, "localtime");
if (day >= 0 && day != ltm->tm_yday) {
/*
* print yesterday's total