public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Small changes
@ 2004-11-15 13:12 Jakub Jelinek
  0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2004-11-15 13:12 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: Glibc hackers

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-11-15 13:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-15 13:12 [PATCH] Small changes Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).