Compare commits

...

1 Commits

Author SHA1 Message Date
Evan Hunt
d537d0fb6e slience strerror_r 'unused return value' warnings 2018-08-28 15:48:21 -07:00
6 changed files with 13 additions and 3 deletions

View File

@@ -34,4 +34,8 @@ isc_string_strlcat(char *dst, const char *src, size_t size);
#define strlcat isc_string_strlcat
#endif
int
isc_string_strerror(int errnum, char *buf, size_t buflen);
#define strerror_r isc_string_strerror
ISC_LANG_ENDDECLS

View File

@@ -16,7 +16,6 @@
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <sys/time.h>
#include <errno.h>
@@ -24,6 +23,7 @@
#include <isc/mutex.h>
#include <isc/util.h>
#include <isc/print.h>
#include <isc/string.h>
#include <isc/once.h>
#if ISC_MUTEX_PROFILE

View File

@@ -103,3 +103,8 @@ isc_string_strlcat(char *dst, const char *src, size_t size)
return(dlen + (s - src)); /* count does not include NUL */
}
int
isc_string_strerror(int errnum, char *buf, size_t buflen) {
return (strerror_r(errnum, buf, buflen));
}

View File

@@ -15,10 +15,10 @@
#include <config.h>
#include <stdbool.h>
#include <string.h>
#include <isc/platform.h>
#include <isc/result.h>
#include <isc/string.h>
#include <isc/util.h>
#include "errno2result.h"

View File

@@ -17,7 +17,7 @@
#include "errno2result.h"
#include <isc/result.h>
#include <isc/strerror.h>
#include <isc/string.h>
#include <isc/util.h>
/*

View File

@@ -614,6 +614,7 @@ isc_stdio_sync
isc_stdio_tell
isc_stdio_write
isc_stdtime_get
isc_string_strerror
isc_string_strlcat
isc_string_strlcpy
isc_symtab_count