Skip to content

Commit dc2788f

Browse files
hawkbit-client: fix artifact size error check
Actually check if json_get_int() set an error, not if the pointer exists. Artifacts of size 0 won't happen in the real world, but the check should be corrected nonetheless. Signed-off-by: Bastian Krause <bst@pengutronix.de>
1 parent 9693c55 commit dc2788f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/hawkbit-client.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1256,7 +1256,7 @@ static gboolean process_deployment(JsonNode *req_root, GError **error)
12561256
goto proc_error;
12571257

12581258
artifact->size = json_get_int(json_artifact, "$.size", error);
1259-
if (!artifact->size && error)
1259+
if (!artifact->size && *error)
12601260
goto proc_error;
12611261

12621262
artifact->sha1 = json_get_string(json_artifact, "$.hashes.sha1", error);

0 commit comments

Comments
 (0)