[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.10 and 1.12

version 1.10, 2017/06/12 19:05:47 version 1.12, 2022/04/14 16:43:44
Line 1 
Line 1 
 /*      $Id$ */  /* $Id$ */
 /*  /*
    * Copyright (c) 2014, 2015, 2017, 2018 Ingo Schwarze <schwarze@openbsd.org>
  * Copyright (c) 2009, 2011 Kristaps Dzonsons <kristaps@bsd.lv>   * Copyright (c) 2009, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
  * 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 27 
Line 27 
 #include <stdio.h>  #include <stdio.h>
 #include <string.h>  #include <string.h>
   
   #define DEBUG_NODEF 1
 #include "mandoc.h"  #include "mandoc.h"
 #include "mandoc_aux.h"  #include "mandoc_aux.h"
   
Line 111  mandoc_strndup(const char *ptr, size_t sz)
Line 112  mandoc_strndup(const char *ptr, size_t sz)
 {  {
         char    *p;          char    *p;
   
         p = mandoc_malloc(sz + 1);          p = strndup(ptr, sz);
         memcpy(p, ptr, sz);          if (p == NULL)
         p[(int)sz] = '\0';                  err((int)MANDOCLEVEL_SYSERR, NULL);
         return p;          return p;
 }  }

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

CVSweb