From patchwork Wed Nov 28 01:11:22 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: NeilBrown X-Patchwork-Id: 1813431 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 18E9B3FC54 for ; Wed, 28 Nov 2012 01:12:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752846Ab2K1BM3 (ORCPT ); Tue, 27 Nov 2012 20:12:29 -0500 Received: from cantor2.suse.de ([195.135.220.15]:47468 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752359Ab2K1BM3 (ORCPT ); Tue, 27 Nov 2012 20:12:29 -0500 Received: from relay2.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 4E686A2FB8; Wed, 28 Nov 2012 02:12:28 +0100 (CET) From: Neil Brown To: Steve Dickson Date: Wed, 28 Nov 2012 12:11:22 +1100 Subject: [PATCH 1/3] gssd_proc: use pollsize, not FD_ALLOC_BLOCK, in get_poll_index(). Cc: linux-nfs@vger.kernel.org Message-ID: <20121128011122.2475.42464.stgit@notabene.brown> In-Reply-To: <20121128010939.2475.13123.stgit@notabene.brown> References: <20121128010939.2475.13123.stgit@notabene.brown> User-Agent: StGit/0.16 MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org 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 --- utils/gssd/gssd_proc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/utils/gssd/gssd_proc.c b/utils/gssd/gssd_proc.c index ec251fa..2d7ec94 100644 --- a/utils/gssd/gssd_proc.c +++ b/utils/gssd/gssd_proc.c @@ -398,10 +398,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