| version 1.73, 2016/06/06 17:22:59 |
version 1.74, 2016/08/17 18:07:07 |
|
|
| #include <stdlib.h> |
#include <stdlib.h> |
| #include <string.h> |
#include <string.h> |
| #include <unistd.h> |
#include <unistd.h> |
| |
#include <syslog.h> |
| #include <wchar.h> |
#include <wchar.h> |
| |
|
| #include "local.h" |
#include "local.h" |
|
|
| free(convbuf); |
free(convbuf); |
| convbuf = NULL; |
convbuf = NULL; |
| if ((wcp = GETARG(wchar_t *)) == NULL) { |
if ((wcp = GETARG(wchar_t *)) == NULL) { |
| |
struct syslog_data sdata = SYSLOG_DATA_INIT; |
| |
int save_errno = errno; |
| |
|
| |
syslog_r(LOG_CRIT | LOG_CONS, &sdata, |
| |
"vfprintf \%ls NULL in \"%s\"", fmt0); |
| |
errno = save_errno; |
| |
|
| cp = "(null)"; |
cp = "(null)"; |
| } else { |
} else { |
| convbuf = __wcsconv(wcp, prec); |
convbuf = __wcsconv(wcp, prec); |
|
|
| } |
} |
| } else |
} else |
| #endif /* PRINTF_WIDE_CHAR */ |
#endif /* PRINTF_WIDE_CHAR */ |
| if ((cp = GETARG(char *)) == NULL) |
if ((cp = GETARG(char *)) == NULL) { |
| |
struct syslog_data sdata = SYSLOG_DATA_INIT; |
| |
int save_errno = errno; |
| |
|
| |
syslog_r(LOG_CRIT | LOG_CONS, &sdata, |
| |
"vfprintf \%s NULL in \"%s\"", fmt0); |
| |
errno = save_errno; |
| |
|
| cp = "(null)"; |
cp = "(null)"; |
| |
} |
| if (prec >= 0) { |
if (prec >= 0) { |
| /* |
/* |
| * can't use strlen; can only look for the |
* can't use strlen; can only look for the |