Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/telnet Avoid unnecessary casts, from openbsd. No bin...
details: https://anonhg.NetBSD.org/src/rev/fff8b2d9d6fe
branches: trunk
changeset: 447241:fff8b2d9d6fe
user: maya <maya%NetBSD.org@localhost>
date: Sat Jan 05 06:30:05 2019 +0000
description:
Avoid unnecessary casts, from openbsd. No binary change.
diffstat:
usr.bin/telnet/commands.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diffs (40 lines):
diff -r d994f7f8d23d -r fff8b2d9d6fe usr.bin/telnet/commands.c
--- a/usr.bin/telnet/commands.c Sat Jan 05 05:40:00 2019 +0000
+++ b/usr.bin/telnet/commands.c Sat Jan 05 06:30:05 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: commands.c,v 1.73 2018/12/14 23:40:17 christos Exp $ */
+/* $NetBSD: commands.c,v 1.74 2019/01/05 06:30:05 maya Exp $ */
/*
* Copyright (C) 1997 and 1998 WIDE Project.
@@ -63,7 +63,7 @@
#if 0
static char sccsid[] = "@(#)commands.c 8.4 (Berkeley) 5/30/95";
#else
-__RCSID("$NetBSD: commands.c,v 1.73 2018/12/14 23:40:17 christos Exp $");
+__RCSID("$NetBSD: commands.c,v 1.74 2019/01/05 06:30:05 maya Exp $");
#endif
#endif /* not lint */
@@ -280,16 +280,16 @@
}
if (uic >= 0x80) {
buf[0] = '\\';
- buf[1] = (char)(((c >> 6) & 07) + '0');
- buf[2] = (char)(((c >> 3) & 07) + '0');
- buf[3] = (char)((c & 07) + '0');
+ buf[1] = ((c >> 6) & 07) + '0';
+ buf[2] = ((c >> 3) & 07) + '0';
+ buf[3] = (c & 07) + '0';
buf[4] = '\0';
} else if (uic >= 0x20) {
- buf[0] = (char)c;
+ buf[0] = c;
buf[1] = '\0';
} else {
buf[0] = '^';
- buf[1] = (char)('@' + c);
+ buf[1] = '@' + c;
buf[2] = '\0';
}
return (buf);
Home |
Main Index |
Thread Index |
Old Index