This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Small changes


Hi!

First two hunks are to kill warnings, third one fixes linuxthreads
compilation.  The 4th is questionable, maybe for (;;); would be enough
to shut up the compiler and there is no need for ABORT_INSTRUCTION
etc.  On the other side, it eats just a few insns and is there just in
case.

2004-11-15  Jakub Jelinek  <jakub@redhat.com>

	* posix/bug-regex24.c: Include string.h.

	* nis/nis_clone_obj.c (nis_clone_object): Rename out3 label to out2
	and out2 to out.  Remove out label.  Formatting.

	* sysdeps/unix/sysv/linux/libc_fatal.c: Include stdbool.h.

	* sysdeps/unix/sysv/linux/libc_fatal.c (__libc_fatal): Add an endless
	loop with ABORT_INSTRUCTION and _exit (127).

--- libc/posix/bug-regex24.c.jj	2004-11-12 10:41:34.000000000 +0100
+++ libc/posix/bug-regex24.c	2004-11-15 13:41:30.473467295 +0100
@@ -1,5 +1,6 @@
 #include <regex.h>
 #include <stdio.h>
+#include <string.h>
 
 #define str "civic"
 
--- libc/nis/nis_clone_obj.c.jj	2004-11-01 13:25:30.000000000 +0100
+++ libc/nis/nis_clone_obj.c	2004-11-15 13:59:11.931088857 +0100
@@ -41,27 +41,26 @@ nis_clone_object (const nis_object *src,
   if (dest == NULL)
     {
       if ((res = calloc (1, sizeof (nis_object))) == NULL)
-	goto out2;
+	goto out;
     }
   else
     res = dest;
 
   xdrmem_create (&xdrs, addr, size, XDR_ENCODE);
-  if (!_xdr_nis_object (&xdrs, (nis_object *)src))
-    goto out3;
+  if (!_xdr_nis_object (&xdrs, (nis_object *) src))
+    goto out2;
   xdr_destroy (&xdrs);
   xdrmem_create (&xdrs, addr, size, XDR_DECODE);
   if (!_xdr_nis_object (&xdrs, res))
     {
-    out3:
+    out2:
       if (dest == NULL)
 	free (res);
       res = NULL;
     }
 
- out:
   xdr_destroy (&xdrs);
- out2:
+ out:
   free (addr);
 
   return res;
--- libc/sysdeps/unix/sysv/linux/libc_fatal.c.jj	2004-11-15 13:33:19.379074135 +0100
+++ libc/sysdeps/unix/sysv/linux/libc_fatal.c	2004-11-15 13:45:59.818414627 +0100
@@ -20,6 +20,7 @@
 #include <fcntl.h>
 #include <paths.h>
 #include <stdarg.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -154,5 +155,12 @@ __libc_fatal (message)
      const char *message;
 {
   __libc_message (1, "%s", message);
+  while (1)
+    {
+#ifdef ABORT_INSTRUCTION
+      ABORT_INSTRUCTION;
+#endif
+      _exit (127);
+    }
 }
 libc_hidden_def (__libc_fatal)

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]