Skip to content

Commit

Permalink
Cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
eerimoq committed Jan 20, 2020
1 parent 2bf8d70 commit 4bed3df
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions pbtools/c_source/pbtools.c
Original file line number Diff line number Diff line change
Expand Up @@ -2126,7 +2126,7 @@ void pbtools_decoder_skip_field(struct pbtools_decoder_t *self_p,
break;

case PBTOOLS_WIRE_TYPE_64_BIT:
(void)pbtools_decoder_read_fixed64(self_p, PBTOOLS_WIRE_TYPE_64_BIT);
decoder_seek(self_p, 8);
break;

case PBTOOLS_WIRE_TYPE_LENGTH_DELIMITED:
Expand All @@ -2135,7 +2135,7 @@ void pbtools_decoder_skip_field(struct pbtools_decoder_t *self_p,
break;

case PBTOOLS_WIRE_TYPE_32_BIT:
(void)pbtools_decoder_read_fixed32(self_p, PBTOOLS_WIRE_TYPE_32_BIT);
decoder_seek(self_p, 4);
break;

default:
Expand All @@ -2155,7 +2155,7 @@ void *pbtools_message_new(
size_t message_size,
pbtools_message_init_t message_init)
{
void *self_p;
struct pbtools_message_base_t *self_p;
struct pbtools_heap_t *heap_p;

heap_p = heap_new(workspace_p, size);
Expand All @@ -2164,9 +2164,7 @@ void *pbtools_message_new(
return (NULL);
}

self_p = heap_alloc(heap_p,
message_size,
alignof(struct pbtools_message_base_t));
self_p = heap_alloc(heap_p, message_size, alignof(*self_p));

if (self_p != NULL) {
message_init(self_p, heap_p);
Expand Down

0 comments on commit 4bed3df

Please sign in to comment.