xfs: fix error initialization
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 10 Oct 2016 05:49:18 +0000 (16:49 +1100)
committerDave Chinner <david@fromorbit.com>
Mon, 10 Oct 2016 05:49:18 +0000 (16:49 +1100)
Eric Sandeen reported a gcc complaint about uninitialized error
variables, so fix that.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reported-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_reflink.c

index 220d2638bb84cec98ce3bf1ea7867c9140685075..5965e9455d91e03621680a08493610085d5a926c 100644 (file)
@@ -1437,7 +1437,7 @@ xfs_reflink_dirty_extents(
        xfs_off_t               flen;
        struct xfs_bmbt_irec    map[2];
        int                     nmaps;
-       int                     error;
+       int                     error = 0;
 
        while (end - fbno > 0) {
                nmaps = 1;