Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
xattr.c: fix incorrect error handling in get_xattrs()
Fix incorrect error handling in get_xattrs() which leads to Mksquashfs failing to read the filesystem on appending. get_xattrs() originally collected error results in res, and then returned res as the function result. Suucess would fall through with res containing the correct result. Unfortunately, a recent commit introduced a failed flag returned by get_xattr() which is logically reversed (TRUE fail, FALSE success). Fall through in the success case therefore now returns the wrong error code. Fix this by removing the fall through of res, and just return TRUE, with error conditions also directly returning rather than jumping to the end of the function. This fixes the error and also simplifies the code, removing the unnecessary label and jumps. Reported-by: Kevin Vigor <kvigor@gmail.com> Signed-off-by: Phillip Lougher <plougher@redhat.com>
- Loading branch information