bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug(let) in tack-1.06


From: Thomas Dickey
Subject: Re: Bug(let) in tack-1.06
Date: Thu, 24 Feb 2011 17:27:19 -0500 (EST)

On Thu, 24 Feb 2011, Schmitz, Joachim wrote:

Hi there

In tack-1.06/output.c I encountered a warning reg. a pointless comparison of an 
unsigned value vs. EOF, and found that this is due to the fact that chat is 
unsigned on my platform (as on many others too). Here's the patch I came up 
with:

--- ./output.c.orig     2007-04-29 18:18:46.000000000 -0500
+++ ./output.c  2011-02-23 13:00:12.000000000 -0600
@@ -718,8 +718,8 @@
int
wait_here(void)
{
-       char ch, cc[64];
-       char message[16];
+       signed char ch;
+       char cc[64], message[16];
       int i, j;

       for (i = 0; i < (int) sizeof(cc); i++) {


Maybe int whould have been a better choice, not sure.

int would be better (will do that - thanks).

       return FALSE;
#endif
+#ifdef __TANDEM

hmm - I wonder if there are other implementations that do this.

+    return getuid() != 65535 && geteuid() != 65535;    /* ...finally, disallow
root */
+#else
    return getuid() != 0 && geteuid() != 0;    /* ...finally, disallow root */
+#endif
}
#endif

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]