2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-21 14:49:41 +00:00

Replace all uses of strerror() by ovs_strerror(), for thread safety.

Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Ben Pfaff
2013-06-24 10:54:49 -07:00
parent 5fcbed7479
commit 10a89ef04d
56 changed files with 298 additions and 269 deletions

View File

@@ -6,6 +6,7 @@
*/
#include "sflow_api.h"
#include "util.h"
static void * sflAlloc(SFLAgent *agent, size_t bytes);
static void sflFree(SFLAgent *agent, void *obj);
@@ -469,7 +470,7 @@ void sfl_agent_error(SFLAgent *agent, char *modName, char *msg)
void sfl_agent_sysError(SFLAgent *agent, char *modName, char *msg)
{
char errm[MAX_ERRMSG_LEN];
snprintf(errm, sizeof errm, "sfl_agent_sysError: %s: %s (errno = %d - %s)\n", modName, msg, errno, strerror(errno));
snprintf(errm, sizeof errm, "sfl_agent_sysError: %s: %s (errno = %d - %s)\n", modName, msg, errno, ovs_strerror(errno));
if(agent->errorFn) (*agent->errorFn)(agent->magic, agent, errm);
else {
fprintf(stderr, "%s\n", errm);