Avoid reading an uninitialized variable when adding new cylinders

If mbar = 0 then *p would not be set, but the variable was then used in
the calling function.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2013-05-15 22:24:26 -07:00
parent 3a37554f35
commit 63c0c7921b

View file

@ -102,6 +102,8 @@ static void convert_volume_pressure(int ml, int mbar, double *v, double *p)
else
pressure = mbar / 1000.0;
*p = pressure;
} else {
*p = 0;
}
*v = volume;
}