Skip to content
Snippets Groups Projects

Revert "Remove unwanted exit"

Merged Clara Daia Hilgenberg Daru requested to merge revert-db7a5601 into issue/3503
2 files
+ 4
6
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -294,7 +294,7 @@ static struct user_log * last_modified () {
if (x == ENOENT)
fprintf(stderr, "Perhaps this file was removed by the "
"operator to prevent logging info.\n");
return NULL;
exit(1);
}
/*
@@ -425,8 +425,7 @@ static struct user_log * last_modified () {
break;
if ((p = (struct utmplist *)malloc(sizeof(struct utmplist))) == NULL) {
fprintf(stderr, "ERROR: out of memory\n");
return NULL;
exit(1);
}
memcpy(&p->ut, &ut, sizeof(struct utmp));
p->next = utmplist;
@@ -543,7 +542,7 @@ static struct user_log * last_modified () {
break;
if ((p = (struct utmplist *)malloc(sizeof(struct utmplist))) == NULL) {
fprintf(stderr, "ERROR: out of memory\n");
return NULL;
exit(1);
}
memcpy(&p->ut, &ut, sizeof(struct utmp));
p->next = utmplist;
@@ -576,7 +575,7 @@ int get_user_count () {
strftime (yesterday,7,"%y%m%d",timeinfo);
yesterday[6] = '\0';
for(i = u; i; i = u){
if(!strcmp(i->logout,"999999")){
if(strcmp(i->login,yesterday) <= 0){
Loading