changeset 2509:daaa78c8c980

* callproc.c (relocate_fd): Make messages string literals, not initialized arrays.
author Jim Blandy <jimb@redhat.com>
date Sat, 10 Apr 1993 07:58:30 +0000
parents 3aa2f3b35353
children e604df2fc029
files src/callproc.c
diffstat 1 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/callproc.c	Sat Apr 10 07:57:57 1993 +0000
+++ b/src/callproc.c	Sat Apr 10 07:58:30 1993 +0000
@@ -529,12 +529,11 @@
       int new = dup (fd);
       if (new == -1)
 	{
-	  char message1[] =
-	    "Error while setting up child: ";
-	  char message2[] = "\n";
-	  write (2, message1, sizeof (message1) - 1);
+	  char *message1 = "Error while setting up child: ";
+	  char *message2 = "\n";
+	  write (2, message1, strlen (message1));
 	  write (2, sys_errlist[errno], strlen (sys_errlist[errno]));
-	  write (2, message2, sizeof (message2) - 1);
+	  write (2, message2, strlen (message2));
 	  _exit (1);
 	}
       /* Note that we hold the original FD open while we recurse,