mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 10:19:26 +00:00
Add extraneous braces to stiffle warnings from gcc-2.8
This commit is contained in:
parent
6b58627302
commit
c4c4aaacea
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=34536
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: auth.c,v 1.26 1998/01/05 01:35:17 brian Exp $
|
||||
* $Id: auth.c,v 1.27 1998/01/21 02:15:09 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
* o Implement check against with registered IP addresses.
|
||||
@ -160,11 +160,12 @@ AuthGetSecret(const char *fname, const char *system, int len, int setaddr)
|
||||
if (setaddr) {
|
||||
memset(&DefHisAddress, '\0', sizeof DefHisAddress);
|
||||
}
|
||||
if (n > 2 && setaddr)
|
||||
if (n > 2 && setaddr) {
|
||||
if (UseHisaddr(vector[2], 1))
|
||||
IpcpInit();
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
if (n > 3)
|
||||
SetLabel(vector[3]);
|
||||
return (passwd);
|
||||
|
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: chap.c,v 1.28 1997/12/24 09:28:53 brian Exp $
|
||||
* $Id: chap.c,v 1.29 1998/02/19 02:10:06 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
@ -225,7 +225,7 @@ RecvChapTalk(struct fsmheader *chp, struct mbuf *bp)
|
||||
*/
|
||||
if (memcmp(cp, cdigest, 16) == 0) {
|
||||
ChapOutput(CHAP_SUCCESS, chp->id, "Welcome!!", 10);
|
||||
if ((mode & MODE_DIRECT) && isatty(modem) && Enabled(ConfUtmp))
|
||||
if ((mode & MODE_DIRECT) && isatty(modem) && Enabled(ConfUtmp)) {
|
||||
if (Utmp)
|
||||
LogPrintf(LogERROR, "Oops, already logged in on %s\n",
|
||||
VarBaseDevice);
|
||||
@ -238,6 +238,7 @@ RecvChapTalk(struct fsmheader *chp, struct mbuf *bp)
|
||||
ID0login(&ut);
|
||||
Utmp = 1;
|
||||
}
|
||||
}
|
||||
NewPhase(PHASE_NETWORK);
|
||||
break;
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: command.c,v 1.131 1998/01/27 23:14:49 brian Exp $
|
||||
* $Id: command.c,v 1.132 1998/03/12 02:23:35 brian Exp $
|
||||
*
|
||||
*/
|
||||
#include <sys/param.h>
|
||||
@ -210,15 +210,15 @@ DialCommand(struct cmdargs const *arg)
|
||||
static int
|
||||
SetLoopback(struct cmdargs const *arg)
|
||||
{
|
||||
if (arg->argc == 1)
|
||||
if (arg->argc == 1) {
|
||||
if (!strcasecmp(*arg->argv, "on")) {
|
||||
VarLoopback = 1;
|
||||
return 0;
|
||||
}
|
||||
else if (!strcasecmp(*arg->argv, "off")) {
|
||||
} else if (!strcasecmp(*arg->argv, "off")) {
|
||||
VarLoopback = 0;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -249,7 +249,7 @@ ShellCommand(struct cmdargs const *arg, int bg)
|
||||
}
|
||||
#endif
|
||||
|
||||
if (arg->argc == 0)
|
||||
if (arg->argc == 0) {
|
||||
if (!(mode & MODE_INTER)) {
|
||||
if (VarTerm)
|
||||
LogPrintf(LogWARN, "Can't start an interactive shell from"
|
||||
@ -263,6 +263,8 @@ ShellCommand(struct cmdargs const *arg, int bg)
|
||||
" the foreground mode\n");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if ((shell = getenv("SHELL")) == 0)
|
||||
shell = _PATH_BSHELL;
|
||||
|
||||
@ -533,11 +535,12 @@ ShowInitialMRU(struct cmdargs const *arg)
|
||||
static int
|
||||
ShowPreferredMTU(struct cmdargs const *arg)
|
||||
{
|
||||
if (VarTerm)
|
||||
if (VarTerm) {
|
||||
if (VarPrefMTU)
|
||||
fprintf(VarTerm, " Preferred MTU: %d\n", VarPrefMTU);
|
||||
else
|
||||
fprintf(VarTerm, " Preferred MTU: unspecified\n");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1001,7 +1004,7 @@ SetServer(struct cmdargs const *arg)
|
||||
|
||||
/* What's what ? */
|
||||
port = arg->argv[0];
|
||||
if (arg->argc == 2)
|
||||
if (arg->argc == 2) {
|
||||
if (ismask(arg->argv[1])) {
|
||||
passwd = NULL;
|
||||
mask = arg->argv[1];
|
||||
@ -1009,7 +1012,7 @@ SetServer(struct cmdargs const *arg)
|
||||
passwd = arg->argv[1];
|
||||
mask = NULL;
|
||||
}
|
||||
else if (arg->argc == 3) {
|
||||
} else if (arg->argc == 3) {
|
||||
passwd = arg->argv[1];
|
||||
mask = arg->argv[2];
|
||||
if (!ismask(mask))
|
||||
@ -1513,14 +1516,14 @@ AddCommand(struct cmdargs const *arg)
|
||||
if (arg->argc != 3 && arg->argc != 2)
|
||||
return -1;
|
||||
|
||||
if (arg->argc == 2)
|
||||
if (arg->argc == 2) {
|
||||
if (strcasecmp(arg->argv[0], "default"))
|
||||
return -1;
|
||||
else {
|
||||
dest.s_addr = netmask.s_addr = INADDR_ANY;
|
||||
gw = 1;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
if (strcasecmp(arg->argv[0], "MYADDR") == 0)
|
||||
dest = IpcpInfo.want_ipaddr;
|
||||
else if (strcasecmp(arg->argv[0], "HISADDR") == 0)
|
||||
@ -1545,7 +1548,7 @@ DeleteCommand(struct cmdargs const *arg)
|
||||
{
|
||||
struct in_addr dest, none;
|
||||
|
||||
if (arg->argc == 1)
|
||||
if (arg->argc == 1) {
|
||||
if(strcasecmp(arg->argv[0], "all") == 0)
|
||||
DeleteIfRoutes(0);
|
||||
else {
|
||||
@ -1558,7 +1561,7 @@ DeleteCommand(struct cmdargs const *arg)
|
||||
none.s_addr = INADDR_ANY;
|
||||
OsSetRoute(RTM_DELETE, dest, none, none, arg->data ? 1 : 0);
|
||||
}
|
||||
else
|
||||
} else
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
|
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: deflate.c,v 1.5 1997/12/28 02:17:06 brian Exp $
|
||||
* $Id: deflate.c,v 1.6 1998/01/10 01:55:09 brian Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -277,7 +277,7 @@ DeflateInput(u_short *proto, struct mbuf *mi)
|
||||
flush = Z_SYNC_FLUSH;
|
||||
}
|
||||
|
||||
if (InputState.cx.avail_out == 0)
|
||||
if (InputState.cx.avail_out == 0) {
|
||||
/* overflow */
|
||||
if (first) {
|
||||
if (!(wp[1] & 1)) {
|
||||
@ -295,6 +295,7 @@ DeflateInput(u_short *proto, struct mbuf *mi)
|
||||
InputState.cx.next_out = MBUF_CTOP(mo);
|
||||
InputState.cx.avail_out = DEFLATE_CHUNK_LEN;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (mi != NULL)
|
||||
|
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: hdlc.c,v 1.28 1998/01/21 02:15:15 brian Exp $
|
||||
* $Id: hdlc.c,v 1.29 1998/03/12 02:23:38 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
@ -389,12 +389,13 @@ DecodePacket(u_short proto, struct mbuf * bp)
|
||||
* If proto isn't PROTO_COMPD, we still want to pass it to the
|
||||
* decompression routines so that the dictionary's updated
|
||||
*/
|
||||
if (CcpFsm.state == ST_OPENED)
|
||||
if (CcpFsm.state == ST_OPENED) {
|
||||
if (proto == PROTO_COMPD) {
|
||||
if ((bp = CompdInput(&proto, bp)) == NULL)
|
||||
return;
|
||||
} else if ((proto & 0xfff1) == 0x21) /* Network Layer protocol */
|
||||
CcpDictSetup(proto, bp);
|
||||
}
|
||||
|
||||
switch (proto) {
|
||||
case PROTO_LCP:
|
||||
|
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: ip.c,v 1.37 1998/01/11 17:53:18 brian Exp $
|
||||
* $Id: ip.c,v 1.38 1998/01/21 02:15:16 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
* o Return ICMP message for filterd packet
|
||||
@ -473,11 +473,12 @@ IpInput(struct mbuf * bp)
|
||||
IpcpAddInOctets(nb);
|
||||
nb += sizeof tun - sizeof tun.data;
|
||||
nw = write(tun_out, &tun, nb);
|
||||
if (nw != nb)
|
||||
if (nw != nb) {
|
||||
if (nw == -1)
|
||||
LogPrintf(LogERROR, "IpInput: wrote %d, got %s\n", nb, strerror(errno));
|
||||
else
|
||||
LogPrintf(LogERROR, "IpInput: wrote %d, got %d\n", nb, nw);
|
||||
}
|
||||
}
|
||||
pfree(bp);
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: modem.c,v 1.78 1998/02/19 02:10:11 brian Exp $
|
||||
* $Id: modem.c,v 1.79 1998/03/06 00:35:30 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
@ -918,11 +918,12 @@ ShowModemStatus(struct cmdargs const *arg)
|
||||
fprintf(VarTerm, "fd = %d, modem control = %o\n", modem, mbits);
|
||||
fprintf(VarTerm, "connect count: %d\n", connect_count);
|
||||
#ifdef TIOCOUTQ
|
||||
if (modem >= 0)
|
||||
if (modem >= 0) {
|
||||
if (ioctl(modem, TIOCOUTQ, &nb) >= 0)
|
||||
fprintf(VarTerm, "outq: %d\n", nb);
|
||||
else
|
||||
fprintf(VarTerm, "outq: ioctl probe failed: %s\n", strerror(errno));
|
||||
}
|
||||
#endif
|
||||
fprintf(VarTerm, "outqlen: %d\n", ModemQlen());
|
||||
fprintf(VarTerm, "DialScript = %s\n", VarDialScript);
|
||||
|
@ -18,7 +18,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: pap.c,v 1.20 1997/12/24 09:29:11 brian Exp $
|
||||
* $Id: pap.c,v 1.21 1998/02/19 02:10:13 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
@ -166,7 +166,7 @@ PapInput(struct mbuf * bp)
|
||||
SendPapCode(php->id, PAP_ACK, "Greetings!!");
|
||||
lcp->auth_ineed = 0;
|
||||
if (lcp->auth_iwait == 0) {
|
||||
if ((mode & MODE_DIRECT) && isatty(modem) && Enabled(ConfUtmp))
|
||||
if ((mode & MODE_DIRECT) && isatty(modem) && Enabled(ConfUtmp)) {
|
||||
if (Utmp)
|
||||
LogPrintf(LogERROR, "Oops, already logged in on %s\n",
|
||||
VarBaseDevice);
|
||||
@ -179,6 +179,7 @@ PapInput(struct mbuf * bp)
|
||||
ID0login(&ut);
|
||||
Utmp = 1;
|
||||
}
|
||||
}
|
||||
NewPhase(PHASE_NETWORK);
|
||||
}
|
||||
} else {
|
||||
|
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: route.c,v 1.41 1998/01/19 02:59:33 brian Exp $
|
||||
* $Id: route.c,v 1.42 1998/01/21 02:15:26 brian Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -100,7 +100,7 @@ OsSetRoute(int cmd,
|
||||
cp = rtmes.m_space;
|
||||
memcpy(cp, &rtdata, 16);
|
||||
cp += 16;
|
||||
if (cmd == RTM_ADD)
|
||||
if (cmd == RTM_ADD) {
|
||||
if (gateway.s_addr == INADDR_ANY) {
|
||||
/* Add a route through the interface */
|
||||
struct sockaddr_dl dl;
|
||||
@ -127,6 +127,7 @@ OsSetRoute(int cmd,
|
||||
cp += 16;
|
||||
rtmes.m_rtm.rtm_addrs |= RTA_GATEWAY;
|
||||
}
|
||||
}
|
||||
|
||||
if (dst.s_addr == INADDR_ANY)
|
||||
mask.s_addr = INADDR_ANY;
|
||||
@ -149,7 +150,7 @@ OsSetRoute(int cmd,
|
||||
LogPrintf(LogTCPIP, "OsSetRoute: Mask = %s\n", inet_ntoa(mask));
|
||||
failed:
|
||||
if (cmd == RTM_ADD && (rtmes.m_rtm.rtm_errno == EEXIST ||
|
||||
(rtmes.m_rtm.rtm_errno == 0 && errno == EEXIST)))
|
||||
(rtmes.m_rtm.rtm_errno == 0 && errno == EEXIST))) {
|
||||
if (!bang)
|
||||
LogPrintf(LogWARN, "Add route failed: %s already exists\n",
|
||||
inet_ntoa(dst));
|
||||
@ -158,7 +159,7 @@ failed:
|
||||
if ((wb = ID0write(s, &rtmes, nb)) < 0)
|
||||
goto failed;
|
||||
}
|
||||
else if (cmd == RTM_DELETE &&
|
||||
} else if (cmd == RTM_DELETE &&
|
||||
(rtmes.m_rtm.rtm_errno == ESRCH ||
|
||||
(rtmes.m_rtm.rtm_errno == 0 && errno == ESRCH))) {
|
||||
if (!bang)
|
||||
@ -223,8 +224,8 @@ p_sockaddr(struct sockaddr *phost, struct sockaddr *pmask, int width)
|
||||
case AF_LINK:
|
||||
if (dl->sdl_nlen)
|
||||
snprintf(buf, sizeof buf, "%.*s", dl->sdl_nlen, dl->sdl_data);
|
||||
else if (dl->sdl_alen)
|
||||
if (dl->sdl_type == IFT_ETHER)
|
||||
else if (dl->sdl_alen) {
|
||||
if (dl->sdl_type == IFT_ETHER) {
|
||||
if (dl->sdl_alen < sizeof buf / 3) {
|
||||
int f;
|
||||
u_char *MAC;
|
||||
@ -235,9 +236,9 @@ p_sockaddr(struct sockaddr *phost, struct sockaddr *pmask, int width)
|
||||
buf[f*3-1] = '\0';
|
||||
} else
|
||||
strcpy(buf, "??:??:??:??:??:??");
|
||||
else
|
||||
} else
|
||||
sprintf(buf, "<IFT type %d>", dl->sdl_type);
|
||||
else if (dl->sdl_slen)
|
||||
} else if (dl->sdl_slen)
|
||||
sprintf(buf, "<slen %d?>", dl->sdl_slen);
|
||||
else
|
||||
sprintf(buf, "link#%d", dl->sdl_index);
|
||||
|
Loading…
Reference in New Issue
Block a user