Commit 281c8187 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Clarify a pointers value for FlexeLint

parent 1dfaf8aa
......@@ -90,7 +90,7 @@ vdi_random_getfd(const struct director *d, struct sess *sp)
struct vbc *vbe;
struct director *d2;
struct SHA256Context ctx;
uint8_t sign[SHA256_LEN], *hp;
uint8_t sign[SHA256_LEN], *hp = NULL;
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
CHECK_OBJ_NOTNULL(d, DIRECTOR_MAGIC);
......@@ -128,6 +128,7 @@ vdi_random_getfd(const struct director *d, struct sess *sp)
* amongst the healthy set.
*/
if (vs->criteria != c_random) {
AN(hp);
u = vle32dec(hp);
r = u / 4294967296.0;
assert(r >= 0.0 && r < 1.0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment