PERFORCE change 166761 for review

Edward Tomasz Napierala trasz at FreeBSD.org
Thu Jul 30 05:56:30 UTC 2009


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

Change 166761 by trasz at trasz_victim on 2009/07/30 05:55:57

	Fix rule addition and removal.  Previously, we always rewrote
	the rule with "::".

Affected files ...

.. //depot/projects/soc2009/trasz_limits/TODO#5 edit
.. //depot/projects/soc2009/trasz_limits/usr.sbin/hrl/hrl.c#19 edit

Differences ...

==== //depot/projects/soc2009/trasz_limits/TODO#5 (text+ko) ====

@@ -10,7 +10,7 @@
 
  - Add sorting to hrl(8).
 
- - Add resolving numeric IDs into names to hrl(8).
+ - Use expand_number(3) in hrl(8).
 
 
 Limits to do:

==== //depot/projects/soc2009/trasz_limits/usr.sbin/hrl/hrl.c#19 (text+ko) ====

@@ -317,10 +317,12 @@
 	if (argc > 1)
 		usage();
 
-	if (argc == 1)
-		rule = strdup(argv[0]);
-	else
-		rule = strdup("::");
+	if (rule == NULL) {
+		if ( argc == 1)
+			rule = strdup(argv[0]);
+		else
+			rule = strdup("::");
+	}
 
 	if (aflag + lflag + rflag + uflag + argc > 1)
 		errx(1, "only one flag or argument may be specified "


More information about the p4-projects mailing list