]> code.delx.au - gnu-emacs/commitdiff
* callproc.c (relocate_fd): Make messages string literals, not
authorJim Blandy <jimb@redhat.com>
Sat, 10 Apr 1993 07:58:30 +0000 (07:58 +0000)
committerJim Blandy <jimb@redhat.com>
Sat, 10 Apr 1993 07:58:30 +0000 (07:58 +0000)
initialized arrays.

src/callproc.c

index 72d2b8c6ddde0860c5e2caeb873e68338f95fa95..7fd218b584d7ebb8ec459cc7c5453f65c13333c7 100644 (file)
@@ -529,12 +529,11 @@ relocate_fd (fd, min)
       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,