From ce867af34f7e79cd8ba7681ceb7256c39e8e7a57 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Thu, 25 Feb 2016 23:11:44 +0100 Subject: [PATCH] this is a static variable, and it is bad --- s/cmake-init | 1 + src/kernel/curse.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/s/cmake-init b/s/cmake-init index 05bae5540..35378d6a5 100755 --- a/s/cmake-init +++ b/s/cmake-init @@ -16,6 +16,7 @@ MACHINE=`uname -m` [ -z "$CC" ] && [ ! -z `which cc` ] && CC="cc" BIN_DIR="$ROOT/build-$MACHINE-$CC-$BUILD" mkdir -p $BIN_DIR +rm -f $BUILD ln -sf $BIN_DIR $BUILD MACHINE=$(gcc -dumpmachine) diff --git a/src/kernel/curse.c b/src/kernel/curse.c index 66890475e..597b7340d 100644 --- a/src/kernel/curse.c +++ b/src/kernel/curse.c @@ -57,7 +57,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #define MAXENTITYHASH 7919 -curse *cursehash[MAXENTITYHASH]; +static curse *cursehash[MAXENTITYHASH]; void c_setflag(curse * c, unsigned int flags) { @@ -829,4 +829,4 @@ void free_curses(void) { for (i = 0; i != MAXCTHASH; ++i) { ql_free(cursetypes[i]); } -} \ No newline at end of file +}