/[svn]/hopm/trunk/src/libopm/src/malloc.c
ViewVC logotype

Diff of /hopm/trunk/src/libopm/src/malloc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 5093 by michael, Mon Dec 22 19:16:10 2014 UTC revision 5094 by michael, Tue Dec 23 20:26:04 2014 UTC
# Line 22  Line 22 
22   */   */
23    
24  #include <assert.h>  #include <assert.h>
25    #include <string.h>
26  #include "setup.h"  #include "setup.h"
27    
28  #include "malloc.h"  #include "malloc.h"
# Line 68  void libopm_MyFree(void **var) Line 69  void libopm_MyFree(void **var)
69        free(*var);        free(*var);
70     *var = NULL;     *var = NULL;
71  }  }
72    
73    void *
74    libopm_xstrdup(const char *s)
75    {
76      void *ret = malloc(strlen(s) + 1);
77    
78      assert(ret);
79      strcpy(ret, s);
80    
81      return ret;
82    }

Legend:
Removed from v.5093  
changed lines
  Added in v.5094

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28