[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.28 and 1.29

version 1.28, 2013/05/17 00:13:14 version 1.29, 2014/01/04 17:50:55
Line 31 
Line 31 
                 fatal("xmalloc: zero size");                  fatal("xmalloc: zero size");
         ptr = malloc(size);          ptr = malloc(size);
         if (ptr == NULL)          if (ptr == NULL)
                 fatal("xmalloc: out of memory (allocating %lu bytes)", (u_long) size);                  fatal("xmalloc: out of memory (allocating %zu bytes)", size);
         return ptr;          return ptr;
 }  }
   
Line 46 
Line 46 
                 fatal("xcalloc: nmemb * size > SIZE_T_MAX");                  fatal("xcalloc: nmemb * size > SIZE_T_MAX");
         ptr = calloc(nmemb, size);          ptr = calloc(nmemb, size);
         if (ptr == NULL)          if (ptr == NULL)
                 fatal("xcalloc: out of memory (allocating %lu bytes)",                  fatal("xcalloc: out of memory (allocating %zu bytes)",
                     (u_long)(size * nmemb));                      size * nmemb);
         return ptr;          return ptr;
 }  }
   
Line 66 
Line 66 
         else          else
                 new_ptr = realloc(ptr, new_size);                  new_ptr = realloc(ptr, new_size);
         if (new_ptr == NULL)          if (new_ptr == NULL)
                 fatal("xrealloc: out of memory (new_size %lu bytes)",                  fatal("xrealloc: out of memory (new_size %zu bytes)",
                     (u_long) new_size);                      new_size);
         return new_ptr;          return new_ptr;
 }  }
   

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.29