Merge branch 'autocli' of https://github.com/shmuelnatan/clixon into shmuelnatan-autocli

This commit is contained in:
Olof hagsand 2021-04-22 20:45:51 +02:00
commit 1c7e52f829
8 changed files with 379 additions and 37 deletions

View file

@ -171,13 +171,13 @@ static int
flogtime(FILE *f)
{
struct timeval tv;
struct tm tm;
struct tm *tm;
gettimeofday(&tv, NULL);
localtime_r((time_t*)&tv.tv_sec, &tm);
tm = localtime((time_t*)&tv.tv_sec);
fprintf(f, "%s %2d %02d:%02d:%02d: ",
mon2name(tm.tm_mon), tm.tm_mday,
tm.tm_hour, tm.tm_min, tm.tm_sec);
mon2name(tm->tm_mon), tm->tm_mday,
tm->tm_hour, tm->tm_min, tm->tm_sec);
return 0;
}

View file

@ -113,7 +113,7 @@ xml2file_recurse(FILE *f,
int haselement;
char *val;
char *encstr = NULL; /* xml encoded string */
if (x == NULL)
goto ok;
name = xml_name(x);