Added m_getfld () interface description.
[mmh] / sbr / pidstatus.c
index 7991d59..fab90d5 100644 (file)
@@ -2,13 +2,12 @@
 /*
  * pidstatus.c -- report child's status
  *
- * $Id$
- *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
  * complete copyright information.
  */
 
+#include <sys/wait.h>
 #include <h/mh.h>
 
 /*
  */
 #include <sigmsg.h>
 
-#ifdef HAVE_SYS_WAIT_H
-# include <sys/wait.h>
-#endif
-
 #ifndef WTERMSIG
 # define WTERMSIG(s) ((int)((s) & 0x7F))
 #endif
@@ -55,7 +50,8 @@ pidstatus (int status, FILE *fp, char *cp)
            if (cp)
                fprintf (fp, "%s: ", cp);
            fprintf (fp, "signal %d", signum);
-           if (signum >= 0 && signum < sizeof(sigmsg) && sigmsg[signum] != NULL)
+           if (signum >= 0 && signum < (int) sizeof(sigmsg) &&
+                  sigmsg[signum] != NULL)
                fprintf (fp, " (%s%s)\n", sigmsg[signum],
                         WCOREDUMP(status) ? ", core dumped" : "");
            else