Skip to contentSkip to conversation

xfsprogs: Fix stray semicolon in libxfs/rdwr.c

PATCH In review Eric Sandeen 3 participants 3 messages Nov 14, 2013 – Nov 18, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfsprogs: Fix stray semicolon in libxfs/rdwr.c

The commit:

800db1c1 libxfs: refactor libxfs_buf_read_map for xfs_db

introduced a stray semicolon during the refactoring. Luckily it only breaks the error case.

(Caught by Coverity, CID 1128894)

---

libxfs/rdwr.c +1 -1
index 0aa2eba..0219a08 100644
@@ -754,7 +754,7 @@ libxfs_readbufr_map(struct xfs_buftarg *btp, struct xfs_buf *bp,
 		offset += len;
 	}
 
-	if (!error);
+	if (!error)
 		bp->b_flags |= LIBXFS_B_UPTODATE;
 #ifdef IO_DEBUG
 	printf("%lx: %s: read %u bytes, error %d, blkno=0x%llx(0x%llx), %p\n",

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Eric Sandeen

The commit:

800db1c1 libxfs: refactor libxfs_buf_read_map for xfs_db

introduced a stray semicolon during the refactoring. Luckily it only breaks the error case.

(Caught by Coverity, CID 1128894)

My fault, but really, this is something that gcc should warn about because it's almost always a bug....

Quoted 8 lines

---

libxfs/rdwr.c +0 -0
index 0aa2eba..0219a08 100644

libxfs/rdwr.c libxfs_readbufr_map(struct xfs_buftarg *btp, struct xfs_buf *bp, · line 760

Quoted 8 lines
libxfs/rdwr.c +1 -1
@@ -754,7 +754,7 @@ libxfs_readbufr_map(struct xfs_buftarg *btp, struct xfs_buf *bp,
 		offset += len;
 	}
 
-	if (!error);
+	if (!error)
 		bp->b_flags |= LIBXFS_B_UPTODATE;
 #ifdef IO_DEBUG
 	printf("%lx: %s: read %u bytes, error %d, blkno=0x%llx(0x%llx), %p\n",

Looks good.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs