Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/nathanw_sa]: src/sys/arch Negative exit code cleanup: Replace exit(-x) w...



details:   https://anonhg.NetBSD.org/src/rev/df160a6af943
branches:  nathanw_sa
changeset: 504602:df160a6af943
user:      wiz <wiz%NetBSD.org@localhost>
date:      Fri Apr 06 11:13:57 2001 +0000

description:
Negative exit code cleanup: Replace exit(-x) with exit(x).
As seen on tech-userlevel.

diffstat:

 sys/arch/hpc/stand/libsa/panic.c     |  46 ++++++++++++++++++++++++++++++++
 sys/arch/hpcmips/stand/libsa/panic.c |  51 ++++++++++++++++++++++++++++++++++++
 2 files changed, 97 insertions(+), 0 deletions(-)

diffs (105 lines):

diff -r b9d79d7df736 -r df160a6af943 sys/arch/hpc/stand/libsa/panic.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/hpc/stand/libsa/panic.c  Fri Apr 06 11:13:57 2001 +0000
@@ -0,0 +1,46 @@
+/*     $NetBSD: panic.c,v 1.2.8.2 2001/04/06 11:13:57 wiz Exp $        */
+
+/*-
+ * Copyright (c) 2000 Kazuma Arino.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+
+#include <stdlib.h>
+#include <stand.h>
+
+void
+abort()
+{
+       exit (1);
+}
+
+/* dummy! */
+
+__dead void
+panic(const char *fmt, ...)
+{
+       abort();
+    /*NOTREACHED*/
+}
diff -r b9d79d7df736 -r df160a6af943 sys/arch/hpcmips/stand/libsa/panic.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/hpcmips/stand/libsa/panic.c      Fri Apr 06 11:13:57 2001 +0000
@@ -0,0 +1,51 @@
+/*     $NetBSD: panic.c,v 1.3.8.2 2001/04/06 11:13:57 wiz Exp $        */
+
+/*-
+ * Copyright (c) 2000 Kazuma Arino.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+
+#include <stdlib.h>
+#include <stand.h>
+
+void
+abort()
+{
+       exit (1);
+}
+
+/* dummy! */
+
+__dead void
+#ifdef __STDC__
+panic(const char *fmt, ...)
+#else
+panic(fmt /*, va_alist */)
+       char *fmt;
+#endif
+{
+       abort();
+    /*NOTREACHED*/
+}



Home | Main Index | Thread Index | Old Index