# HG changeset patch # User Chiel Broek # Date 1533308215 -7200 # Node ID 119129969d37d5a56fd3997698c31348fcc6812e # Parent fcfc3dbe85faf78525bc6ab169428c9dac863074 Fix for deprecated warnings diff -r fcfc3dbe85fa -r 119129969d37 thermferm/rdconfig.c --- a/thermferm/rdconfig.c Fri Aug 03 16:13:17 2018 +0200 +++ b/thermferm/rdconfig.c Fri Aug 03 16:56:55 2018 +0200 @@ -1204,7 +1204,7 @@ key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); if (sscanf((const char *)key, "%f", &val) == 1) unit->volume = val; - xmlFree(key); + xmlFree(key); } if ((!xmlStrcmp(cur->name, (const xmlChar *)"AIR_ADDRESS"))) { unit->air_address = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); diff -r fcfc3dbe85fa -r 119129969d37 thermferm/server.c --- a/thermferm/server.c Fri Aug 03 16:13:17 2018 +0200 +++ b/thermferm/server.c Fri Aug 03 16:56:55 2018 +0200 @@ -317,7 +317,7 @@ char *opt, *param, *name = NULL, *filename = NULL, *logname = NULL, mbits[11], tstr[24]; DIR *dd; FILE *fp; - struct dirent entry, *result; + struct dirent *result; ls_list *lsx = NULL, *tmp; struct stat sbuf; struct tm *tbuf; @@ -356,12 +356,10 @@ if ((dd = opendir(name))) { for (;;) { - if ((readdir_r(dd, &entry, &result)) != 0) { - syslog(LOG_NOTICE, "readdir_r: error=%d", errno); + if (! (result = readdir(dd))) { + syslog(LOG_NOTICE, "readdir: error=%d", errno); break; } - if (result == NULL) /* End of directory */ - break; if (result->d_name[0] != '.') { filename = xstrcpy(name); filename = xstrcat(filename, result->d_name);