cluster/ec: FORWARD_NULL coverity fix
Fixing FORWARD_NULL coverify errors with EC. CID: 1394650 BUG: 789278 Change-Id: I52c99dac3483ca31a86cd7e3a959d4010b195f32 updates: bz#789278 Signed-off-by: Sunil Kumar Acharya <sheggodu@redhat.com>
This commit is contained in:
parent
0ef74dbd70
commit
fc233b8f69
@ -590,7 +590,7 @@ int32_t ec_dict_data_iatt(ec_cbk_data_t *cbk, int32_t which, char *key)
|
||||
}
|
||||
}
|
||||
|
||||
if (stbuf->ia_type == IA_IFREG) {
|
||||
if ((stbuf != NULL) && (stbuf->ia_type == IA_IFREG)) {
|
||||
ec_iatt_rebuild(ec, stbuf, 1, cbk->count);
|
||||
/* TODO: not sure if an iatt could come in xdata from a fop that takes
|
||||
* no locks. */
|
||||
|
@ -339,9 +339,13 @@ ec_char_array_to_mask (unsigned char *array, int numsubvols)
|
||||
int i = 0;
|
||||
uintptr_t mask = 0;
|
||||
|
||||
if (array == NULL)
|
||||
goto out;
|
||||
|
||||
for (i = 0; i < numsubvols; i++)
|
||||
if (array[i])
|
||||
mask |= (1ULL<<i);
|
||||
out:
|
||||
return mask;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user