PERFORCE change 168729 for review

Gabor Kovesdan gabor at FreeBSD.org
Sun Sep 20 20:46:34 UTC 2009


http://perforce.freebsd.org/chv.cgi?CH=168729

Change 168729 by gabor at gabor_server on 2009/09/20 20:45:44

	- Close two unterminated strings
	- Fix -d behavior

Affected files ...

.. //depot/projects/soc2008/gabor_textproc/newsort/coll.c#10 edit

Differences ...

==== //depot/projects/soc2008/gabor_textproc/newsort/coll.c#10 (text+ko) ====

@@ -71,6 +71,7 @@
 	for (i = j = 0; i < len; i++)
 		if (iswprint(str[i]))
 			ret[j++] = str[i];
+	ret[j] = L'\0';
 
 	return (ret);
 
@@ -90,8 +91,9 @@
 	ret = sort_malloc(sizeof(wint_t) * (len + 1));
 
 	for (i = j = 0; i < len; i++)
-		if (iswalpha(str[i]) || iswblank(str[i]))
+		if (iswalnum(str[i]) || iswblank(str[i]))
 			ret[j++] = str[i];
+	ret[j] = L'\0';
 
 	return (ret);
 }


More information about the p4-projects mailing list