summaryrefslogtreecommitdiff
path: root/usr.sbin/ppp/chat.c
diff options
context:
space:
mode:
authorbrian <brian@cvs.openbsd.org>1997-12-24 09:30:54 +0000
committerbrian <brian@cvs.openbsd.org>1997-12-24 09:30:54 +0000
commit680c56f9b0e96bdf2645460ef3e71d6ec165ad9a (patch)
treeaf433d7193d7f057336d40f4866f865a81daca1a /usr.sbin/ppp/chat.c
parentee509eb41ffd3386cd990df961c005dd18d3d418 (diff)
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 dcc10b607c0..aa202db904b 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.3 1997/12/23 22:38:01 brian Exp $
+ * $Id: chat.c,v 1.4 1997/12/24 09:30:26 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;