xfsprogs: remove unreachable code in libxfs_inode_alloc
PATCH 1/1 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 <[email protected]>
---
libxfs/util.c +0 -2
@@ -700,8 +700,6 @@ libxfs_inode_alloc(if (error)return error; } -if (!ip) - error =ENOSPC ; *ipp = ip;return error;
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 20 lines · Eric Sandeen
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;
Quoted 4 lines
(cherry picked this one out of Coverity reports)
Signed-off-by Eric Sandeen <[email protected]>---
Reviewed-by Brian Foster <[email protected]>
Quoted 15 lines
libxfs/util.c +0
-2@@ -700,8 +700,6 @@ libxfs_inode_alloc(if (error)return error; } -if (!ip) - error =ENOSPC ; *ipp = ip;return error;
Quoted 4 lines
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs