diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2018-10-15 15:27:45 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2018-10-15 17:49:44 +0200 |
commit | 251366146727aac97af5de2eef855860d14910ca (patch) | |
tree | f2c279469e46e0c16e0812e9ef462dbf26d29f6c | |
parent | cbbdace00610ae25a5db8a7156b7d3a2779e4e0b (diff) | |
download | lvm2-251366146727aac97af5de2eef855860d14910ca.tar.gz |
cov: ensure vars are set
Make sure, tmp_begin and tmp_end are always set, even for blind
coverity.
-rw-r--r-- | device_mapper/libdm-report.c | 2 | ||||
-rw-r--r-- | libdm/libdm-report.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/device_mapper/libdm-report.c b/device_mapper/libdm-report.c index cbd0d1669..85d3d0f82 100644 --- a/device_mapper/libdm-report.c +++ b/device_mapper/libdm-report.c @@ -2381,7 +2381,7 @@ static const char *_get_reserved(struct dm_report *rh, unsigned type, { const struct dm_report_reserved_value *iter = implicit ? NULL : rh->reserved_values; const struct dm_report_field_reserved_value *frv; - const char *tmp_begin, *tmp_end, *tmp_s = s; + const char *tmp_begin = NULL, *tmp_end = NULL, *tmp_s = s; const char *name = NULL; char c; diff --git a/libdm/libdm-report.c b/libdm/libdm-report.c index 01255b4d2..a44701704 100644 --- a/libdm/libdm-report.c +++ b/libdm/libdm-report.c @@ -2380,7 +2380,7 @@ static const char *_get_reserved(struct dm_report *rh, unsigned type, { const struct dm_report_reserved_value *iter = implicit ? NULL : rh->reserved_values; const struct dm_report_field_reserved_value *frv; - const char *tmp_begin, *tmp_end, *tmp_s = s; + const char *tmp_begin = NULL, *tmp_end = NULL, *tmp_s = s; const char *name = NULL; char c; |