[BACK]Return to mandoc_aux.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/mandoc_aux.c between version 1.8 and 1.10

version 1.8, 2015/11/06 16:30:33 version 1.10, 2017/06/12 19:05:47
Line 1 
Line 1 
 /*      $Id$ */  /*      $Id$ */
 /*  /*
  * Copyright (c) 2009, 2011 Kristaps Dzonsons <kristaps@bsd.lv>   * Copyright (c) 2009, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
  * Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org>   * Copyright (c) 2014, 2015, 2017 Ingo Schwarze <schwarze@openbsd.org>
  *   *
  * Permission to use, copy, modify, and distribute this software for any   * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above   * purpose with or without fee is hereby granted, provided that the above
Line 19 
Line 19 
   
 #include <sys/types.h>  #include <sys/types.h>
   
   #if HAVE_ERR
 #include <err.h>  #include <err.h>
   #endif
 #include <stdarg.h>  #include <stdarg.h>
 #include <stdlib.h>  #include <stdlib.h>
 #include <stdio.h>  #include <stdio.h>
Line 69  mandoc_malloc(size_t size)
Line 71  mandoc_malloc(size_t size)
 void *  void *
 mandoc_realloc(void *ptr, size_t size)  mandoc_realloc(void *ptr, size_t size)
 {  {
   
         ptr = realloc(ptr, size);          ptr = realloc(ptr, size);
         if (ptr == NULL)          if (ptr == NULL)
                 err((int)MANDOCLEVEL_SYSERR, NULL);                  err((int)MANDOCLEVEL_SYSERR, NULL);
Line 79  mandoc_realloc(void *ptr, size_t size)
Line 80  mandoc_realloc(void *ptr, size_t size)
 void *  void *
 mandoc_reallocarray(void *ptr, size_t num, size_t size)  mandoc_reallocarray(void *ptr, size_t num, size_t size)
 {  {
   
         ptr = reallocarray(ptr, num, size);          ptr = reallocarray(ptr, num, size);
           if (ptr == NULL)
                   err((int)MANDOCLEVEL_SYSERR, NULL);
           return ptr;
   }
   
   void *
   mandoc_recallocarray(void *ptr, size_t oldnum, size_t num, size_t size)
   {
           ptr = recallocarray(ptr, oldnum, num, size);
         if (ptr == NULL)          if (ptr == NULL)
                 err((int)MANDOCLEVEL_SYSERR, NULL);                  err((int)MANDOCLEVEL_SYSERR, NULL);
         return ptr;          return ptr;

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.10

CVSweb