| Summary: | rcmd(3) prototype disagrees with definition | ||
|---|---|---|---|
| Product: | Base System | Reporter: | Christian Weisgerber <naddy> |
| Component: | bin | Assignee: | freebsd-bugs (Nobody) <bugs> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 4.0-CURRENT | ||
| Hardware: | Any | ||
| OS: | Any | ||
<<On Wed, 5 Jan 2000 15:01:35 +0100 (CET), Christian Weisgerber <naddy@mips.rhein-neckar.de> said: >> Synopsis: rcmd(3) prototype disagrees with definition No, it does not. > int rcmd __P((char **, int, const char *, > const char *, const char *, int *)); This is the correct prototype for a declaration of the form: > int > rcmd(ahost, rport, locuser, remuser, cmd, fd2p) > char **ahost; > u_short rport; > const char *locuser, *remuser, *cmd; > int *fd2p; > Which instances should be fixed? Neither. Please read a text on Standard C, such as K&R or H&S. -GAWollman Garrett Wollman: > >> Synopsis: rcmd(3) prototype disagrees with definition > > No, it does not. Indeed. Please close the PR. Sorry for wasting everybody's time. I should have noticed that this is all throughout the tree. > Please read a text on Standard C, such as K&R or H&S. Sigh. I found it, section A7.3.2 in K&Rv2. Integral promotion of integral type arguments and parameters for old style function declarations. -- Christian "naddy" Weisgerber naddy@mips.rhein-neckar.de State Changed From-To: open->closed Closed at originator's request. |
What's the type of rcmd(3)'s second parameter, int or u_short? Man page: int rcmd(char **ahost, int inport, const char *locuser, const char *remuser, const char *cmd, int *fd2p) Prototype in /usr/include/unistd.h: int rcmd __P((char **, int, const char *, const char *, const char *, int *)); Actual definition in src/lib/libc/net/rcmd.c: int rcmd(ahost, rport, locuser, remuser, cmd, fd2p) char **ahost; u_short rport; const char *locuser, *remuser, *cmd; int *fd2p; Which instances should be fixed?