[lvm-devel] [PATCH 15/23] Add test check for find_config_str
Zdenek Kabelac
zkabelac at redhat.com
Tue Dec 21 15:41:47 UTC 2010
It looks like there should be some error code returned from _read_desc
when something fails.
Signed-off-by: Zdenek Kabelac <zkabelac at redhat.com>
---
lib/format_text/import_vsn1.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/format_text/import_vsn1.c b/lib/format_text/import_vsn1.c
index e5e83d4..5a2d664 100644
--- a/lib/format_text/import_vsn1.c
+++ b/lib/format_text/import_vsn1.c
@@ -842,9 +842,9 @@ static void _read_desc(struct dm_pool *mem,
old_suppress = log_suppress(1);
d = find_config_str(cft->root, "description", "");
log_suppress(old_suppress);
- *desc = dm_pool_strdup(mem, d);
+ *desc = (d) ? dm_pool_strdup(mem, d) : NULL;
- get_config_uint32(cft->root, "creation_time", &u);
+ (void) get_config_uint32(cft->root, "creation_time", &u);
*when = u;
}
--
1.7.3.4
More information about the lvm-devel
mailing list