Index: branches/JrCs/i386/libsaio/sys.c =================================================================== --- branches/JrCs/i386/libsaio/sys.c (revision 123) +++ branches/JrCs/i386/libsaio/sys.c (revision 124) @@ -624,7 +624,7 @@ if (dirp == NULL) goto error; - dirp->dir_path = newString(path); + dirp->dir_path = strdup(path); if (dirp->dir_path == NULL) goto error; @@ -652,7 +652,7 @@ if (dirp == NULL) goto error; - dirp->dir_path = newString(dirPath); + dirp->dir_path = strdup(dirPath); if (dirp->dir_path == NULL) goto error; Index: branches/JrCs/i386/libsaio/stringTable.c =================================================================== --- branches/JrCs/i386/libsaio/stringTable.c (revision 123) +++ branches/JrCs/i386/libsaio/stringTable.c (revision 124) @@ -708,14 +708,6 @@ return ret; } -char * newString(const char * oldString) -{ - if ( oldString ) - return strcpy(malloc(strlen(oldString)+1), oldString); - else - return NULL; -} - /* * Extracts the next argument from the command line, double quotes are allowed here. */ Index: branches/JrCs/i386/libsaio/saio_internal.h =================================================================== --- branches/JrCs/i386/libsaio/saio_internal.h (revision 123) +++ branches/JrCs/i386/libsaio/saio_internal.h (revision 124) @@ -159,7 +159,6 @@ extern int loadSystemConfig(config_file_t *configBuff); extern int loadHelperConfig(config_file_t *configBuff); extern int loadOverrideConfig(config_file_t *configBuff); -extern char * newString(const char *oldString); extern char * getNextArg(char ** ptr, char * val); extern long ParseXMLFile( char * buffer, TagPtr * dict ); Index: branches/JrCs/i386/libsa/libsa.h =================================================================== --- branches/JrCs/i386/libsa/libsa.h (revision 123) +++ branches/JrCs/i386/libsa/libsa.h (revision 124) @@ -90,6 +90,7 @@ extern int strlen(const char * str); extern char * strcat(char * s1, const char * s2); extern char * strncat(char * s1, const char * s2, size_t n); +extern char * strdup(const char *s1); #if STRNCASECMP extern int strncasecmp(const char * s1, const char * s2, size_t n); Index: branches/JrCs/i386/libsa/string.c =================================================================== --- branches/JrCs/i386/libsa/string.c (revision 123) +++ branches/JrCs/i386/libsa/string.c (revision 124) @@ -241,6 +241,11 @@ return(strncat(s1, s2, strlen(s2))); } +char *strdup(const char *s1) +{ + return strcpy (malloc (strlen (s1) + 1), s1); +} + #if STRNCASECMP int strncasecmp(const char *s1, const char *s2, size_t len) {