diff options
author | Peter Rajnoha <prajnoha@redhat.com> | 2014-11-12 15:16:54 +0100 |
---|---|---|
committer | Peter Rajnoha <prajnoha@redhat.com> | 2014-11-12 15:16:54 +0100 |
commit | 359dc6fa76f765a5503b3fda7a596984272a4a4e (patch) | |
tree | 1b66dca1effba66113c4dda889e25d83dace10f2 | |
parent | c03d8473ea9ad585f27207404a242b7b11caf74f (diff) | |
download | lvm2-359dc6fa76f765a5503b3fda7a596984272a4a4e.tar.gz |
coverity: commit ba2302346 - report log_sys_error properly
log_sys_error uses errno, hence we need to report the first
failure before reporting another failure that uses errno as well.
-rw-r--r-- | lib/activate/dev_manager.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c index a17cd2563..6e5b7851b 100644 --- a/lib/activate/dev_manager.c +++ b/lib/activate/dev_manager.c @@ -1873,9 +1873,9 @@ static int _pool_callback(struct dm_tree_node *node, } /* let's assume there is no problem to read 64 bytes */ if (read(fd, buf, sizeof(buf)) < sizeof(buf)) { + log_sys_error("read", argv[args]); if (close(fd)) log_sys_error("close", argv[args]); - log_sys_error("read", argv[args]); return 0; } for (ret = 0; ret < DM_ARRAY_SIZE(buf); ++ret) |