Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more linting #174

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
avoid multiple return
  • Loading branch information
fperrad committed Nov 15, 2022
commit cf5903595c0c3e56d079744efda8478fb193d6c9
7 changes: 5 additions & 2 deletions src/mqtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1734,9 +1734,12 @@ ssize_t mqtt_unpack_response(struct mqtt_response* response, const uint8_t *buf,
rv = mqtt_unpack_unsuback_response(response, buf);
break;
case MQTT_CONTROL_PINGRESP:
return rv;
/* nothing to unpack */
rv = 0;
break;
default:
return MQTT_ERROR_RESPONSE_INVALID_CONTROL_TYPE;
rv = MQTT_ERROR_RESPONSE_INVALID_CONTROL_TYPE;
break;
}

if (rv < 0) return rv;
Expand Down