]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] NFS: fix for older gcc's
authorAndrew Morton <akpm@osdl.org>
Mon, 9 Feb 2004 08:30:48 +0000 (00:30 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Mon, 9 Feb 2004 08:30:48 +0000 (00:30 -0800)
From: Trond Myklebust <trond.myklebust@fys.uio.no>

Fix for proper C99 designated initializer, and avoid warning from
missing (unreachable - but gcc doesn't know it) return.

fs/nfs/nfs4proc.c

index 3d509bd94b0e656864e2c308d47c884d93d85e87..2471044408256766ffe7334bd643559b3f9cef5d 100644 (file)
@@ -2061,6 +2061,7 @@ nfs4_lck_type(int cmd, struct file_lock *request)
                        return NFS4_WRITE_LT; 
        }
        BUG();
+       return 0;
 }
 
 static inline uint64_t
@@ -2208,7 +2209,9 @@ nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock *request)
        if (lsp == NULL) {
                struct nfs4_state_owner *owner = state->owner;
                struct nfs_open_to_lock otl = {
-                       .lock_owner.clientid = server->nfs4_state->cl_clientid,
+                       .lock_owner = {
+                               .clientid = server->nfs4_state->cl_clientid,
+                       },
                };
                status = -ENOMEM;
                lsp = nfs4_alloc_lock_state(state, request->fl_owner);