Merge pull request #1104 from mmichal10/init-var
Initialize uninitialized variable
This commit is contained in:
commit
30eff21e65
@ -26,9 +26,9 @@ Open CAS uses Safe string library (safeclib) that is MIT licensed.
|
|||||||
To download latest Open CAS Linux release run following commands:
|
To download latest Open CAS Linux release run following commands:
|
||||||
|
|
||||||
```
|
```
|
||||||
wget https://github.com/Open-CAS/open-cas-linux/releases/download/v21.6.1/open-cas-linux-21.06.1.0547.release.tar.gz
|
wget https://github.com/Open-CAS/open-cas-linux/releases/download/v21.6.5/open-cas-linux-21.06.5.0555.release.tar.gz
|
||||||
tar -xf open-cas-linux-21.06.1.0547.release.tar.gz
|
tar -xf open-cas-linux-21.06.5.0555.release.tar.gz
|
||||||
cd open-cas-linux-21.06.1.0547.release/
|
cd open-cas-linux-21.06.5.0555.release/
|
||||||
```
|
```
|
||||||
|
|
||||||
Alternatively, if you want recent development (unstable) version, you can clone GitHub repository:
|
Alternatively, if you want recent development (unstable) version, you can clone GitHub repository:
|
||||||
|
@ -2751,7 +2751,7 @@ int list_caches(unsigned int list_format, bool by_id_path)
|
|||||||
char status_buf[CACHE_STATE_LENGHT];
|
char status_buf[CACHE_STATE_LENGHT];
|
||||||
const char *tmp_status;
|
const char *tmp_status;
|
||||||
char mode_string[12];
|
char mode_string[12];
|
||||||
char cache_ctrl_dev[MAX_STR_LEN];
|
char cache_ctrl_dev[MAX_STR_LEN] = "-";
|
||||||
float cache_flush_prog;
|
float cache_flush_prog;
|
||||||
float core_flush_prog;
|
float core_flush_prog;
|
||||||
|
|
||||||
@ -2778,13 +2778,10 @@ int list_caches(unsigned int list_format, bool by_id_path)
|
|||||||
if (!curr_cache->standby_detached) {
|
if (!curr_cache->standby_detached) {
|
||||||
snprintf(cache_ctrl_dev, sizeof(cache_ctrl_dev),
|
snprintf(cache_ctrl_dev, sizeof(cache_ctrl_dev),
|
||||||
"/dev/cas-cache-%d", curr_cache->id);
|
"/dev/cas-cache-%d", curr_cache->id);
|
||||||
} else {
|
|
||||||
strncpy(cache_ctrl_dev, "-", sizeof(cache_ctrl_dev));
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
snprintf(mode_string, sizeof(mode_string), "%s",
|
snprintf(mode_string, sizeof(mode_string), "%s",
|
||||||
cache_mode_to_name(curr_cache->mode));
|
cache_mode_to_name(curr_cache->mode));
|
||||||
strncpy(cache_ctrl_dev, "-", sizeof(cache_ctrl_dev));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user