From: NeilBrown Date: Wed, 28 Nov 2012 19:32:00 +0000 (-0500) Subject: gssd_proc: use pollsize, not FD_ALLOC_BLOCK, in get_poll_index() X-Git-Tag: debian/1%1.2.8-1~11^2^2~48 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=c889e30a376e18fdef8ec74ade9897aa9e3d803a;p=nfs-utils.git gssd_proc: use pollsize, not FD_ALLOC_BLOCK, in get_poll_index() get_poll_index wants to walk the entire "pollarray", but uses the constant FD_ALLOC_BLOCK, rather than the variable pollsize (which has the same value). If we want to make the size of the array variable, it is best not to use the constant. As pollsize is 'unsigned long', 'i' should be too. Signed-off-by: NeilBrown Signed-off-by: Steve Dickson --- diff --git a/utils/gssd/gssd_proc.c b/utils/gssd/gssd_proc.c index 2fba7de..ba118d7 100644 --- a/utils/gssd/gssd_proc.c +++ b/utils/gssd/gssd_proc.c @@ -387,10 +387,10 @@ process_clnt_dir_files(struct clnt_info * clp) static int get_poll_index(int *ind) { - int i; + unsigned int i; *ind = -1; - for (i=0; i