summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/lcp.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1997-12-24 09:29:17 +0000
committerbrian <brian@FreeBSD.org>1997-12-24 09:29:17 +0000
commit14d342e696e1f58935e230c2b5bda26daa36cda0 (patch)
tree73e0e9a6ac1b2542326d644b2e9f7611a6f6a810 /usr.sbin/ppp/lcp.c
parente2cdbfbbb2fff725814c29bd10d948ba15f8240e (diff)
downloadFreeBSD-src-14d342e696e1f58935e230c2b5bda26daa36cda0.zip
FreeBSD-src-14d342e696e1f58935e230c2b5bda26daa36cda0.tar.gz
Cosmetic (style):
sizeof(var) -> sizeof var sizeof type -> sizeof(type) Suggested by: J Wunsch <j@uriah.heep.sax.de>
Diffstat (limited to 'usr.sbin/ppp/lcp.c')
-rw-r--r--usr.sbin/ppp/lcp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/ppp/lcp.c b/usr.sbin/ppp/lcp.c
index 3a90487..84d5688 100644
--- a/usr.sbin/ppp/lcp.c
+++ b/usr.sbin/ppp/lcp.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: lcp.c,v 1.49 1997/12/03 10:23:49 brian Exp $
+ * $Id: lcp.c,v 1.50 1997/12/07 23:55:27 brian Exp $
*
* TODO:
* o Validate magic number received from peer.
@@ -117,7 +117,7 @@ static const char *cftypes[] = {
"LDBACP", /* 23: Link Discriminator for BACP */
};
-#define NCFTYPES (sizeof(cftypes)/sizeof(char *))
+#define NCFTYPES (sizeof cftypes/sizeof cftypes[0])
struct fsm LcpFsm = {
"LCP", /* Name of protocol */
@@ -791,7 +791,7 @@ LcpDecodeConfig(u_char *cp, int plen, int mode_type)
break;
default:
- sz = (sizeof(desc)-2)/2;
+ sz = (sizeof desc - 2) / 2;
if (sz > length - 2)
sz = length - 2;
pos = 0;
@@ -803,8 +803,8 @@ LcpDecodeConfig(u_char *cp, int plen, int mode_type)
if (mode_type == MODE_REQ) {
reqreject:
- if (length > sizeof(RejBuff) - (rejp - RejBuff)) {
- length = sizeof(RejBuff) - (rejp - RejBuff);
+ if (length > sizeof RejBuff - (rejp - RejBuff)) {
+ length = sizeof RejBuff - (rejp - RejBuff);
LogPrintf(LogLCP, "Can't REJ length %d - trunating to %d\n",
cp[1], length);
}
OpenPOWER on IntegriCloud