Skip to content

Commit 71edae5

Browse files
committed
Fix unused function warning
1 parent ac353d1 commit 71edae5

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

tasks/task_patch.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -616,12 +616,12 @@ static enum patch_error ips_apply_patch(
616616
return PATCH_PATCH_INVALID;
617617
}
618618

619+
#if defined(HAVE_PATCH) && defined(HAVE_XDELTA)
619620
static enum patch_error xdelta_apply_patch(
620621
const uint8_t *patchdata, uint64_t patchlen,
621622
const uint8_t *sourcedata, uint64_t sourcelength,
622623
uint8_t **targetdata, uint64_t *targetlength)
623624
{
624-
#if defined(HAVE_PATCH) && defined(HAVE_XDELTA)
625625
int ret;
626626
enum patch_error error_patch = PATCH_SUCCESS;
627627
xd3_stream stream;
@@ -710,10 +710,8 @@ static enum patch_error xdelta_apply_patch(
710710
xd3_close_stream(&stream);
711711
xd3_free_stream(&stream);
712712
return error_patch;
713-
#else /* HAVE_PATCH is defined and HAVE_XDELTA is defined */
714-
return PATCH_PATCH_UNSUPPORTED;
715-
#endif
716713
}
714+
#endif
717715

718716
static bool apply_patch_content(uint8_t **buf,
719717
ssize_t *size, const char *patch_desc, const char *patch_path,

0 commit comments

Comments
 (0)