Skip to content

Commit

Permalink
Avoid unnecessary wrappers in pb_dec_submessage() (#484)
Browse files Browse the repository at this point in the history
Gives about 15% stack usage reduction.
  • Loading branch information
PetteriAimonen committed Jan 31, 2020
1 parent f9f31e7 commit 4b14e66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pb_decode.c
Expand Up @@ -1631,7 +1631,7 @@ static bool checkreturn pb_dec_submessage(pb_istream_t *stream, const pb_field_i
/* Now decode the submessage contents */
if (status)
{
status = pb_decode_noinit(&substream, field->submsg_desc, field->pData);
status = pb_decode_inner(&substream, field->submsg_desc, field->pData, 0);
}

if (!pb_close_string_substream(stream, &substream))
Expand Down

0 comments on commit 4b14e66

Please sign in to comment.