svn commit: r238110 - head/tools/regression/pjdfstest

Pawel Jakub Dawidek pjd at FreeBSD.org
Wed Jul 4 17:31:53 UTC 2012


Author: pjd
Date: Wed Jul  4 17:31:53 2012
New Revision: 238110
URL: http://svn.freebsd.org/changeset/base/238110

Log:
  Recognize 'none' or '0' as no flags.

Modified:
  head/tools/regression/pjdfstest/pjdfstest.c

Modified: head/tools/regression/pjdfstest/pjdfstest.c
==============================================================================
--- head/tools/regression/pjdfstest/pjdfstest.c	Wed Jul  4 16:47:39 2012	(r238109)
+++ head/tools/regression/pjdfstest/pjdfstest.c	Wed Jul  4 17:31:53 2012	(r238110)
@@ -350,10 +350,10 @@ str2flags(struct flag *tflags, char *sfl
 	unsigned int i;
 	char *f;
 
-	for (f = strtok(sflags, ","); f != NULL; f = strtok(NULL, ",")) {
-		/* Support magic 'none' flag which just reset all flags. */
-		if (strcmp(f, "none") == 0)
-			return (0);
+	/* 'none' or '0' means no flags */
+	if (strcmp(sflags, "none") == 0 || strcmp(sflags, "0") == 0)
+		return (0);
+	for (f = strtok(sflags, ",|"); f != NULL; f = strtok(NULL, ",|")) {
 		for (i = 0; tflags[i].f_str != NULL; i++) {
 			if (strcmp(tflags[i].f_str, f) == 0)
 				break;


More information about the svn-src-all mailing list