linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Removed compilation warnings from mountd/cache.c
@ 2011-05-16 15:50 Steve Dickson
  2011-05-16 17:29 ` J. Bruce Fields
  0 siblings, 1 reply; 5+ messages in thread
From: Steve Dickson @ 2011-05-16 15:50 UTC (permalink / raw)
  To: Linux NFS Mailing List

Commit 5604b35a6 introduced a number of missing initializer
warnings that were missed. This patch removes those warnings.

Signed-off-by: Steve Dickson <steved@redhat.com>
---
 utils/mountd/cache.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c
index df6b38f..86a2790 100644
--- a/utils/mountd/cache.c
+++ b/utils/mountd/cache.c
@@ -825,7 +825,6 @@ struct {
 	char *cache_name;
 	void (*cache_handle)(FILE *f);
 	FILE *f;
-	char vbuf[RPC_CHAN_BUF_SIZE];
 } cachelist[] = {
 	{ "auth.unix.ip", auth_unix_ip, NULL},
 	{ "auth.unix.gid", auth_unix_gid, NULL},
@@ -833,6 +832,9 @@ struct {
 	{ "nfsd.fh", nfsd_fh, NULL},
 	{ NULL, NULL, NULL }
 };
+struct vbs {
+	char vbuf[RPC_CHAN_BUF_SIZE];
+} vbufs [(sizeof(cachelist)/sizeof(cachelist[0])) - 1];
 
 extern int manage_gids;
 
@@ -850,7 +852,7 @@ void cache_open(void)
 		sprintf(path, "/proc/net/rpc/%s/channel", cachelist[i].cache_name);
 		cachelist[i].f = fopen(path, "r+");
 		if (cachelist[i].f != NULL) {
-			setvbuf(cachelist[i].f, cachelist[i].vbuf, _IOLBF, 
+			setvbuf(cachelist[i].f, vbufs[i].vbuf, _IOLBF, 
 				RPC_CHAN_BUF_SIZE);
 		}
 	}
-- 
1.7.4.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-05-17 14:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-16 15:50 [PATCH] Removed compilation warnings from mountd/cache.c Steve Dickson
2011-05-16 17:29 ` J. Bruce Fields
2011-05-16 19:18   ` Jim Rees
2011-05-16 19:25     ` J. Bruce Fields
2011-05-17 14:00       ` Steve Dickson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).