1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

cleanup: cosmetics.

Initialized attrs so analyzers are less confused
(since currently our method calls should always initialize attrs on
return).
This commit is contained in:
Zdenek Kabelac 2014-05-07 11:44:33 +02:00
parent d88fab8d3a
commit d3e68c8a71
2 changed files with 3 additions and 2 deletions

View File

@ -41,7 +41,7 @@ int lv_is_cow(const struct logical_volume *lv)
static uint64_t _cow_extra_chunks(struct cmd_context *cmd, uint64_t n_chunks) static uint64_t _cow_extra_chunks(struct cmd_context *cmd, uint64_t n_chunks)
{ {
const struct segment_type *segtype; const struct segment_type *segtype;
unsigned attrs; unsigned attrs = 0;
if (activation() && if (activation() &&
(segtype = get_segtype_from_string(cmd, "snapshot")) && (segtype = get_segtype_from_string(cmd, "snapshot")) &&

View File

@ -1907,7 +1907,8 @@ static int _device_has_mounted_fs(char *buffer, unsigned major, unsigned minor,
char kernel_dev_name[PATH_MAX]; char kernel_dev_name[PATH_MAX];
if ((major == data->maj) && (minor == data->min)) { if ((major == data->maj) && (minor == data->min)) {
if (!dm_device_get_name(major, minor, 1, kernel_dev_name, PATH_MAX)) { if (!dm_device_get_name(major, minor, 1, kernel_dev_name,
sizeof(kernel_dev_name))) {
stack; stack;
*kernel_dev_name = '\0'; *kernel_dev_name = '\0';
} }