Skip to content
Snippets Groups Projects
Commit 96eef094 authored by rswindell's avatar rswindell
Browse files

Updated copyright date.

Using strdup() instead of malloc()/strcpy().
parent 5fc90a4d
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 2004 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 2005 Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public License *
......@@ -191,11 +191,9 @@ char* strListAppend(str_list_t* list, const char* str, size_t index)
if(str==NULL)
return(NULL);
if((buf=(char*)malloc(strlen(str)+1))==NULL)
if((buf=strdup(str))==NULL)
return(NULL);
strcpy(buf,str);
if(index==STR_LIST_LAST_INDEX)
index=strListCount(*list);
......@@ -221,11 +219,9 @@ char* strListInsert(str_list_t* list, const char* str, size_t index)
if(str==NULL)
return(NULL);
if((buf=(char*)malloc(strlen(str)+1))==NULL)
if((buf=strdup(str))==NULL)
return(NULL);
strcpy(buf,str);
return(str_list_insert(list,buf,index));
}
......
......@@ -8,7 +8,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 2004 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 2005 Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public License *
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment