]> arthur.barton.de Git - ngircd-alex.git/commitdiff
portabtest: Only use one exit code to indicate errors
authorAlexander Barton <alex@barton.de>
Sun, 29 Dec 2013 16:48:25 +0000 (17:48 +0100)
committerAlexander Barton <alex@barton.de>
Sun, 29 Dec 2013 16:48:25 +0000 (17:48 +0100)
src/portab/portabtest.c

index 335954a47011b1f97e44505a09cd2d72ff9b43af..8284c1d027d2af09640f7924050a8148b35bffd3 100644 (file)
 
 #include "exp.h"
 
 
 #include "exp.h"
 
-static void Panic PARAMS (( char *Reason, int Code ));
+static void Panic PARAMS((char *Reason));
 
 GLOBAL int
 main(void)
 {
        /* validate datatypes */
        if (false != 0)
 
 GLOBAL int
 main(void)
 {
        /* validate datatypes */
        if (false != 0)
-               Panic("false", 1);
+               Panic("false");
        if (true != 1)
        if (true != 1)
-               Panic("true", 1);
+               Panic("true");
        if (sizeof(UINT8) != 1)
        if (sizeof(UINT8) != 1)
-               Panic("UINT8", 1);
+               Panic("UINT8");
        if (sizeof(UINT16) != 2)
        if (sizeof(UINT16) != 2)
-               Panic("UINT16", 1);
+               Panic("UINT16");
        if (sizeof(UINT32) != 4)
        if (sizeof(UINT32) != 4)
-               Panic("UINT32", 1);
+               Panic("UINT32");
 
 #ifdef PROTOTYPES
        /* check functions */
        if (!snprintf)
 
 #ifdef PROTOTYPES
        /* check functions */
        if (!snprintf)
-               Panic("snprintf", 2);
+               Panic("snprintf");
        if (!vsnprintf)
        if (!vsnprintf)
-               Panic("vsnprintf", 2);
+               Panic("vsnprintf");
        if (!strlcpy)
        if (!strlcpy)
-               Panic("strlcpy", 2);
+               Panic("strlcpy");
        if (!strlcat)
        if (!strlcat)
-               Panic("strlcat", 2);
+               Panic("strlcat");
 #endif
        
        /* ok, no error */
 #endif
        
        /* ok, no error */
@@ -58,11 +58,11 @@ main(void)
 } /* portab_check_types */
 
 static void
 } /* portab_check_types */
 
 static void
-Panic(char *Reason, int Code)
+Panic(char *Reason)
 {
        /* Oops, something failed!? */
        fprintf(stderr, "Oops, test for %s failed!?", Reason);
 {
        /* Oops, something failed!? */
        fprintf(stderr, "Oops, test for %s failed!?", Reason);
-       exit(Code);
+       exit(1);
 } /* Panic */
 
 /* -eof- */
 } /* Panic */
 
 /* -eof- */