-
Incident report
-
Resolution: Fixed
-
Trivial
-
3.0.6rc1, 3.2.2rc1, 3.4.0alpha1
Found by Coverity (CID 153297) as uninitialized variable mode usage, but actually mode is used instead of mode_str. Fix is trivial:
Index: src/libs/zbxalgo/prediction.c =================================================================== --- src/libs/zbxalgo/prediction.c (revision 62923) +++ src/libs/zbxalgo/prediction.c (working copy) @@ -908,7 +908,7 @@ int zbx_mode_code(char *mode_str, zbx_mode_t *mode, char **error) { - if ('\0' == *mode || 0 == strcmp(mode_str, "value")) + if ('\0' == *mode_str || 0 == strcmp(mode_str, "value")) { *mode = MODE_VALUE; }