From b13ca2df97e7387dcb331cf4b269e3d899a3f491 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 14 May 2017 22:23:05 +0200 Subject: [PATCH] (task_patch.c) Cleanup --- tasks/task_patch.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tasks/task_patch.c b/tasks/task_patch.c index fd82d3fb3b..4c8ae0af3b 100644 --- a/tasks/task_patch.c +++ b/tasks/task_patch.c @@ -99,7 +99,7 @@ typedef enum patch_error (*patch_func_t)(const uint8_t*, size_t, static uint8_t bps_read(struct bps_data *bps) { - uint8_t data = bps->modify_data[bps->modify_offset++]; + uint8_t data = bps->modify_data[bps->modify_offset++]; bps->modify_checksum = ~(encoding_crc32( ~bps->modify_checksum, &data, 1)); return data; @@ -124,9 +124,6 @@ static uint64_t bps_decode(struct bps_data *bps) static void bps_write(struct bps_data *bps, uint8_t data) { - if (!bps) - return; - bps->target_data[bps->output_offset++] = data; bps->target_checksum = ~(encoding_crc32(~bps->target_checksum, &data, 1)); }