[BACK]Return to xmalloc.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/xmalloc.c between version 1.35 and 1.36

version 1.35, 2019/06/06 05:13:13 version 1.36, 2019/11/12 22:32:48
Line 90 
Line 90 
 }  }
   
 int  int
   xvasprintf(char **ret, const char *fmt, va_list ap)
   {
           int i;
   
           i = vasprintf(ret, fmt, ap);
           if (i < 0 || *ret == NULL)
                   fatal("xvasprintf: could not allocate memory");
           return i;
   }
   
   int
 xasprintf(char **ret, const char *fmt, ...)  xasprintf(char **ret, const char *fmt, ...)
 {  {
         va_list ap;          va_list ap;
         int i;          int i;
   
         va_start(ap, fmt);          va_start(ap, fmt);
         i = vasprintf(ret, fmt, ap);          i = xvasprintf(ret, fmt, ap);
         va_end(ap);          va_end(ap);
           return i;
         if (i < 0 || *ret == NULL)  
                 fatal("xasprintf: could not allocate memory");  
   
         return (i);  
 }  }

Legend:
Removed from v.1.35  
changed lines
  Added in v.1.36