/[radius]/radius/snmplib/snmp_mem.c
ViewVC logotype

Diff of /radius/snmplib/snmp_mem.c

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

revision 1.6 by gray, Tue May 14 11:08:22 2002 UTC revision 1.7 by gray, Wed Apr 30 08:38:30 2003 UTC
# Line 1  Line 1 
1  /*  /*
2     Copyright (C) 2001, Sergey Poznyakoff.     Copyright (C) 2001,2003, Sergey Poznyakoff.
3    
4     This file is part of GNU Radius SNMP Library.     This file is part of GNU Radius SNMP Library.
5    
# Line 32  snmp_alloc_t __snmp_alloc_fp = (snmp_all Line 32  snmp_alloc_t __snmp_alloc_fp = (snmp_all
32  snmp_free_t  __snmp_free_fp  = (snmp_free_t) free;  snmp_free_t  __snmp_free_fp  = (snmp_free_t) free;
33    
34  void *  void *
35  snmp_alloc(size)  snmp_alloc(size_t size)
         size_t size;  
36  {  {
37          return (*__snmp_alloc_fp)(size);          return (*__snmp_alloc_fp)(size);
38  }  }
39    
40  void  void
41  snmp_free(ptr)  snmp_free(void *ptr)
         void *ptr;  
42  {  {
43          if (ptr)          if (ptr)
44                  (*__snmp_free_fp)(ptr);                  (*__snmp_free_fp)(ptr);
45  }  }
46    
47  char *  char *
48  snmp_strdup(str)  snmp_strdup(char *str)
         char *str;  
49  {  {
50          int len = strlen(str)+1;          int len = strlen(str)+1;
51          char *p = snmp_alloc(len);          char *p = snmp_alloc(len);

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26