diff options
author | Danny Al-Gaaf <danny.al-gaaf@bisect.de> | 2013-02-06 12:17:02 +0100 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-02-06 08:42:43 -0800 |
commit | 3acc4d2cfee14ff15e178a4798eb46ef0024d0af (patch) | |
tree | 5cb55524d4708821a46d5a08baac40397b0b3e68 | |
parent | db0dbe5db8bb87443f9450328d70cf9c94c3e167 (diff) | |
download | ceph-3acc4d2cfee14ff15e178a4798eb46ef0024d0af.tar.gz |
rbd-fuse: fix for loop in open_rbd_image()
Remove uninitialized usage of 'int i' as i++ from 'for' loop.
The variale 'i' is never used in this loop and initialized
before the next use with 0.
Related warning from clang++:
rbd_fuse/rbd-fuse.c:141:36: warning: variable 'i' is uninitialized
when used here [-Wuninitialized]
for (im = rbd_images; im != NULL; i++, im = im->next) {
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
-rw-r--r-- | src/rbd_fuse/rbd-fuse.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rbd_fuse/rbd-fuse.c b/src/rbd_fuse/rbd-fuse.c index 0b28f63c3ad..5bdaba3a0d9 100644 --- a/src/rbd_fuse/rbd-fuse.c +++ b/src/rbd_fuse/rbd-fuse.c @@ -138,7 +138,7 @@ open_rbd_image(const char *image_name) return -1; // relies on caller to keep rbd_images up to date - for (im = rbd_images; im != NULL; i++, im = im->next) { + for (im = rbd_images; im != NULL; im = im->next) { if (strcmp(im->image_name, image_name) == 0) { break; } |