From 89b8d422b3d6a6dfe176aed67e5b3e164af20275 Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Mon, 13 Apr 2015 09:33:49 +1000 Subject: [PATCH] xfsprogs: remove unreachable code in libxfs_inode_alloc This code does: if (!ialloc_context && !ip) return; // if !ip here, ialloc_context must be true if (ialloc_context) { ... if (!ip) error = ENOSPC; if (error) return error; // if !ip in this block we've returned } // so (!ip) cannot be true here if (!ip) error = ENOSPC; (cherry picked this one out of Coverity reports) Signed-off-by: Eric Sandeen Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner --- libxfs/util.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libxfs/util.c b/libxfs/util.c index 6464a1b19..49eb76d4a 100644 --- a/libxfs/util.c +++ b/libxfs/util.c @@ -700,8 +700,6 @@ libxfs_inode_alloc( if (error) return error; } - if (!ip) - error = ENOSPC; *ipp = ip; return error; -- 2.47.2