[ZBX-11300] Wrong variable used when processing "mode" parameter of forecast() function Created: 2016 Oct 01 Updated: 2017 May 30 Resolved: 2016 Oct 03 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Server (S) |
Affects Version/s: | 3.0.6rc1, 3.2.2rc1, 3.4.0alpha1 |
Fix Version/s: | 3.0.6rc1, 3.2.2rc1, 3.4.0alpha1 |
Type: | Incident report | Priority: | Trivial |
Reporter: | Glebs Ivanovskis (Inactive) | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | codequality | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Description |
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; } |
Comments |
Comment by Alexander Vladishev [ 2016 Oct 01 ] |
Successfully tested! |
Comment by dimir [ 2016 Oct 03 ] |
Fixed in
|