Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/mail Simplify set(). No functional change.
details: https://anonhg.NetBSD.org/src/rev/c77d07d4de56
branches: trunk
changeset: 555181:c77d07d4de56
user: ross <ross%NetBSD.org@localhost>
date: Mon Nov 10 21:40:22 2003 +0000
description:
Simplify set(). No functional change.
diffstat:
usr.bin/mail/cmd3.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diffs (42 lines):
diff -r 22c69f05738b -r c77d07d4de56 usr.bin/mail/cmd3.c
--- a/usr.bin/mail/cmd3.c Mon Nov 10 21:37:36 2003 +0000
+++ b/usr.bin/mail/cmd3.c Mon Nov 10 21:40:22 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cmd3.c,v 1.24 2003/11/10 21:37:36 ross Exp $ */
+/* $NetBSD: cmd3.c,v 1.25 2003/11/10 21:40:22 ross Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)cmd3.c 8.2 (Berkeley) 4/20/95";
#else
-__RCSID("$NetBSD: cmd3.c,v 1.24 2003/11/10 21:37:36 ross Exp $");
+__RCSID("$NetBSD: cmd3.c,v 1.25 2003/11/10 21:40:22 ross Exp $");
#endif
#endif /* not lint */
@@ -360,7 +360,7 @@
{
char **arglist = v;
struct var *vp;
- char *cp, *cp2;
+ char *cp;
char varbuf[BUFSIZ], **ap, **p;
int errs, h, s;
size_t l;
@@ -382,13 +382,12 @@
errs = 0;
for (ap = arglist; *ap != NULL; ap++) {
cp = *ap;
- cp2 = varbuf;
while (*cp != '=' && *cp != '\0')
++cp;
l = cp - *ap;
if (l >= sizeof varbuf)
l = sizeof varbuf - 1;
- strncpy(cp2, *ap, l);
+ strncpy(varbuf, *ap, l);
varbuf[l] = '\0';
if (*cp == '\0')
cp = "";
Home |
Main Index |
Thread Index |
Old Index