Commit d54c5b9f authored by Adam Wujek's avatar Adam Wujek 💬

lib/snmp: fix checking of return value from set_value

Tread as error when 0 is returned from the set_value function.
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 2d17c5ba
......@@ -992,7 +992,7 @@ static int set_ptp_restart(uint8_t *buf, struct snmp_oid *obj)
restart_val = obj->p;
ret = set_value(buf, obj, restart_val);
if (ret < 0)
if (ret <= 0)
return ret;
switch (*restart_val) {
case restartPtp:
......@@ -1016,7 +1016,7 @@ static int set_ptp_config(uint8_t *buf, struct snmp_oid *obj)
apply_mode = obj->p;
ret = set_value(buf, obj, apply_mode);
if (ret < 0)
if (ret <= 0)
return ret;
switch (*apply_mode) {
case writeToMemoryCurrentSfp:
......
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