From c7155665d1c77d730c31da2a9c64ddd8f81ae2d9 Mon Sep 17 00:00:00 2001 From: markm Date: Mon, 3 Dec 2001 12:16:40 +0000 Subject: [PATCH] More help for alpha WARNS=2. This code is, erm, unusual. Anyone who feels like rewriting it will meet no objection from me. --- contrib/telnet/telnetd/sys_term.c | 8 ++++---- crypto/telnet/telnetd/sys_term.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/contrib/telnet/telnetd/sys_term.c b/contrib/telnet/telnetd/sys_term.c index eff9b1ef4def..385655d68d3f 100644 --- a/contrib/telnet/telnetd/sys_term.c +++ b/contrib/telnet/telnetd/sys_term.c @@ -1245,14 +1245,14 @@ addarg(char **argv, const char *val) } for (cpp = argv; *cpp; cpp++) ; - if (cpp == &argv[(int)argv[-1]]) { + if (cpp == &argv[(long)argv[-1]]) { --argv; - *argv = (char *)((int)(*argv) + 10); - argv = (char **)realloc(argv, sizeof(*argv)*((int)(*argv) + 2)); + *argv = (char *)((long)(*argv) + 10); + argv = (char **)realloc(argv, sizeof(*argv)*((long)(*argv) + 2)); if (argv == NULL) return(NULL); argv++; - cpp = &argv[(int)argv[-1] - 10]; + cpp = &argv[(long)argv[-1] - 10]; } *cpp++ = strdup(val); *cpp = 0; diff --git a/crypto/telnet/telnetd/sys_term.c b/crypto/telnet/telnetd/sys_term.c index eff9b1ef4def..385655d68d3f 100644 --- a/crypto/telnet/telnetd/sys_term.c +++ b/crypto/telnet/telnetd/sys_term.c @@ -1245,14 +1245,14 @@ addarg(char **argv, const char *val) } for (cpp = argv; *cpp; cpp++) ; - if (cpp == &argv[(int)argv[-1]]) { + if (cpp == &argv[(long)argv[-1]]) { --argv; - *argv = (char *)((int)(*argv) + 10); - argv = (char **)realloc(argv, sizeof(*argv)*((int)(*argv) + 2)); + *argv = (char *)((long)(*argv) + 10); + argv = (char **)realloc(argv, sizeof(*argv)*((long)(*argv) + 2)); if (argv == NULL) return(NULL); argv++; - cpp = &argv[(int)argv[-1] - 10]; + cpp = &argv[(long)argv[-1] - 10]; } *cpp++ = strdup(val); *cpp = 0;