/[ascend]/trunk/base/generic/utilities/ascMalloc.c
ViewVC logotype

Diff of /trunk/base/generic/utilities/ascMalloc.c

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

revision 1221 by johnpye, Wed Jan 24 13:31:00 2007 UTC revision 1222 by johnpye, Wed Jan 24 13:46:44 2007 UTC
# Line 43  Line 43 
43   *  The "non-debug" version of ascstrdupf -   *  The "non-debug" version of ascstrdupf -
44   *  all memory calls should be to the system versions.   *  all memory calls should be to the system versions.
45   */   */
46  char *ascstrdupf(CONST char *s)  char *ascstrdupf(CONST char *s){
 {  
47      char *result;      char *result;
48    
49      if (NULL == s) {      if(s == NULL){
50      return NULL;          return NULL;
51    }      }
52      result = (char *)malloc(strlen(s) + 1);  
53    if (NULL != result) {      result = ASC_NEW_ARRAY(char,strlen(s) + 1);
54      strcpy(result, s);  
55    }      if(result != NULL){
56            strcpy(result, s);
57        }
58      return result;      return result;
59  }  }
60    

Legend:
Removed from v.1221  
changed lines
  Added in v.1222

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22