[Pvfs2-cvs] commit by slang in pvfs2/src/common/misc: str-utils.c
CVS commit program
cvs at parl.clemson.edu
Tue May 1 12:30:58 EDT 2007
Update of /projects/cvsroot/pvfs2/src/common/misc
In directory parlweb1:/tmp/cvs-serv10131/src/common/misc
Modified Files:
str-utils.c
Log Message:
fixes to let bmi methods only get the listen addr they care about.
Index: str-utils.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/common/misc/str-utils.c,v
diff -p -u -r1.20 -r1.21
--- str-utils.c 2 Feb 2007 02:08:57 -0000 1.20
+++ str-utils.c 1 May 2007 16:30:58 -0000 1.21
@@ -365,11 +365,30 @@ int PINT_split_string_list(char ***token
holder++;
}
+ /* if we don't find any commas, just set the entire string to the first
+ * token and return
+ */
+ if(0 == tokencount)
+ {
+ tokencount = 1;
+ }
+
/* allocate pointers for each */
*tokens = (char **) malloc(sizeof(char *) * tokencount);
if (!(*tokens))
{
return 0;
+ }
+
+ if(1 == tokencount)
+ {
+ (*tokens)[0] = strdup(comma_list);
+ if(!(*tokens)[0])
+ {
+ tokencount = 0;
+ goto failure;
+ }
+ return tokencount;
}
/* copy out all of the tokenized strings */
More information about the Pvfs2-cvs
mailing list