summaryrefslogtreecommitdiff
path: root/inputmethod/canna/patches/patch-lib_RK_ncache.c
blob: 3fb048202623b8f48e5e11018d5290bc39564623 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$NetBSD: patch-lib_RK_ncache.c,v 1.2 2015/10/25 12:17:36 tsutsui Exp $

Pull upstream fix to avoid crash problem of cannaserver.
 https://osdn.jp/cvs/view/canna/canna/lib/RK/ncache.c?view=log#rev1.3

--- lib/RK/ncache.c.orig	2003-09-17 08:50:52.000000000 +0000
+++ lib/RK/ncache.c
@@ -27,7 +27,7 @@ static char rcsid[]="$Id: ncache.c,v 1.2
 #include	"RKintern.h"
 
 #define	NCHASH		101
-#define	hash(x)		((int)((x)%NCHASH))
+#define	hash(x)		((int)(((unsigned long)(x))%NCHASH))
 
 static struct ncache	Nchash[NCHASH];
 static struct ncache	Ncfree;