summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/chat.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/chat.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/chat.c')
-rw-r--r--usr.sbin/ppp/chat.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/usr.sbin/ppp/chat.c b/usr.sbin/ppp/chat.c
index 37f5776..b3e3e06 100644
--- a/usr.sbin/ppp/chat.c
+++ b/usr.sbin/ppp/chat.c
@@ -18,7 +18,7 @@
* Columbus, OH 43221
* (614)451-1883
*
- * $Id: chat.c,v 1.40 1997/12/18 01:10:12 brian Exp $
+ * $Id: chat.c,v 1.41 1997/12/23 22:38:51 brian Exp $
*
* TODO:
* o Support more UUCP compatible control sequences.
@@ -186,8 +186,8 @@ ExpandString(const char *str, char *result, int reslen, int sendmode)
case 'T':
if (VarAltPhone == NULL) {
if (VarNextPhone == NULL) {
- strncpy(VarPhoneCopy, VarPhoneList, sizeof(VarPhoneCopy) - 1);
- VarPhoneCopy[sizeof(VarPhoneCopy) - 1] = '\0';
+ strncpy(VarPhoneCopy, VarPhoneList, sizeof VarPhoneCopy - 1);
+ VarPhoneCopy[sizeof VarPhoneCopy - 1] = '\0';
VarNextPhone = VarPhoneCopy;
}
VarAltPhone = strsep(&VarNextPhone, ":");
@@ -292,7 +292,7 @@ WaitforString(const char *estr)
omask = sigblock(sigmask(SIGALRM));
#endif
clear_log();
- ExpandString(estr, buff, sizeof(buff), 0);
+ ExpandString(estr, buff, sizeof buff, 0);
LogPrintf(LogCHAT, "Wait for (%d): %s --> %s\n", TimeoutSec, estr, buff);
str = buff;
inp = inbuff;
@@ -489,7 +489,7 @@ SendString(const char *str)
if (abort_next) {
abort_next = 0;
- ExpandString(str, buff, sizeof(buff), 0);
+ ExpandString(str, buff, sizeof buff, 0);
AbortStrings[numaborts++] = strdup(buff);
} else if (timeout_next) {
timeout_next = 0;
@@ -498,10 +498,10 @@ SendString(const char *str)
TimeoutSec = 30;
} else {
if (*str == '!') {
- ExpandString(str + 1, buff + 2, sizeof(buff) - 2, 0);
+ ExpandString(str + 1, buff + 2, sizeof buff - 2, 0);
ExecStr(buff + 2, buff + 2);
} else {
- ExpandString(str, buff + 2, sizeof(buff) - 2, 1);
+ ExpandString(str, buff + 2, sizeof buff - 2, 1);
}
if (strstr(str, "\\P")) /* Do not log the password itself. */
LogPrintf(LogCHAT, "sending: %s\n", str);
@@ -615,7 +615,7 @@ DoChat(char *script)
}
numaborts = 0;
- memset(vector, '\0', sizeof(vector));
+ memset(vector, '\0', sizeof vector);
argc = MakeArgs(script, vector, VECSIZE(vector));
argv = vector;
TimeoutSec = 30;
OpenPOWER on IntegriCloud