[BACK]Return to vfprintf.c CVS log [TXT][DIR] Up to [local] / src / lib / libc / stdio

Diff for /src/lib/libc/stdio/vfprintf.c between version 1.73 and 1.74

version 1.73, 2016/06/06 17:22:59 version 1.74, 2016/08/17 18:07:07
Line 50 
Line 50 
 #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"
Line 857 
Line 858 
                                 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);
Line 868 
Line 876 
                                 }                                  }
                         } 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

Legend:
Removed from v.1.73  
changed lines
  Added in v.1.74