Subject: lib/24854: modify libutil int->pid_t where appropriate
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <jeffi@rcn.com>
List: netbsd-bugs
Date: 03/20/2004 03:37:50
>Number:         24854
>Category:       lib
>Synopsis:       modify libutil int->pid_t where appropriate
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Mar 20 03:38:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Jeff Ito
>Release:        1.6ZK
>Organization:
>Environment:
NetBSD lab 1.6ZK NetBSD 1.6ZK (LAB) #4: Tue Mar  9 22:03:23 EST 2004  jeff@netbsd:/q/nbsd/src/sys/arch/i386/compile/LAB i386
>Description:
ttymsg.c and ttyaction.c in libutil use int where pid_t is more appropriate
>How-To-Repeat:
n/a

>Fix:
Index: ttyaction.c
===================================================================
RCS file: /cvs/nbsd/src/lib/libutil/ttyaction.c,v
retrieving revision 1.15
diff -u -r1.15 ttyaction.c
--- ttyaction.c 19 Dec 2000 23:09:02 -0000      1.15
+++ ttyaction.c 20 Mar 2004 03:35:59 -0000
@@ -81,7 +81,8 @@
        char env_tty[64];
        char env_act[64];
        char env_user[256];
-       int error, linenum, pid, status;
+       int error, linenum, status;
+       pid_t pid;
 
        _DIAGASSERT(tty != NULL);
        _DIAGASSERT(act != NULL);
Index: ttymsg.c
===================================================================
RCS file: /cvs/nbsd/src/lib/libutil/ttymsg.c,v
retrieving revision 1.18
diff -u -r1.18 ttymsg.c
--- ttymsg.c    7 Aug 2003 16:45:00 -0000       1.18
+++ ttymsg.c    20 Mar 2004 03:35:59 -0000
@@ -135,7 +135,7 @@
                        continue;
                }
                if (errno == EWOULDBLOCK) {
-                       int cpid;
+                       pid_t cpid;
 
                        if (forked) {
                                (void) close(fd);

>Release-Note:
>Audit-Trail:
>Unformatted: