changeset 7940:e871be8c1471

6739333 error(1) has been broken for a while- simple fix
author Matthew Jacob <Matthew.Jacob@Sun.COM>
date Fri, 24 Oct 2008 19:15:34 -0700
parents 95b5c1b14e09
children 6689b49d56b5
files usr/src/cmd/sgs/error/common/errorsubr.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/cmd/sgs/error/common/errorsubr.c	Fri Oct 24 21:35:46 2008 -0400
+++ b/usr/src/cmd/sgs/error/common/errorsubr.c	Fri Oct 24 19:15:34 2008 -0700
@@ -24,8 +24,6 @@
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <stdio.h>
 #include <ctype.h>
 #include <stdlib.h>
@@ -295,6 +293,8 @@
 	for (wordcount = 0, cp = saltedbuffer; *cp; wordcount++) {
 		while (*cp && isspace(*cp))
 			cp++;
+		if (*cp == 0)
+			break;
 		while (*cp && !isspace(*cp))
 			cp++;
 	}