From d75762e0d857c29a0bc6d851f6f34b729113c08b Mon Sep 17 00:00:00 2001 From: axxel Date: Wed, 25 Sep 2024 10:48:45 +0200 Subject: [PATCH] ptp2: remove unused function ptp_have_event --- camlibs/ptp2/ptp.c | 23 ----------------------- camlibs/ptp2/ptp.h | 1 - 2 files changed, 24 deletions(-) diff --git a/camlibs/ptp2/ptp.c b/camlibs/ptp2/ptp.c index 5add28c45..ae8132a84 100644 --- a/camlibs/ptp2/ptp.c +++ b/camlibs/ptp2/ptp.c @@ -3831,29 +3831,6 @@ ptp_get_one_event_by_type(PTPParams *params, uint16_t code, PTPContainer *event) return 0; } -/** - * ptp_have_event: - * - * Check if one specific event has appeared in the queue, without draining it. - * - * params: PTPParams* in: params - * code in: event code - * - * Return values: 1 if removed, 0 if not. - */ -int -ptp_have_event(PTPParams *params, uint16_t code) -{ - unsigned int i; - - if (!params->nrofevents) - return 0; - for (i=0;inrofevents;i++) - if (params->events[i].Code == code) - return 1; - return 0; -} - /** * ptp_canon_eos_getevent: * diff --git a/camlibs/ptp2/ptp.h b/camlibs/ptp2/ptp.h index aa56df13c..3ea4fc98b 100644 --- a/camlibs/ptp2/ptp.h +++ b/camlibs/ptp2/ptp.h @@ -4142,7 +4142,6 @@ uint16_t ptp_wait_event (PTPParams *params); uint16_t ptp_add_event (PTPParams *params, PTPContainer *evt); uint16_t ptp_add_events (PTPParams *params, PTPContainer *evt, unsigned int nrevents); uint16_t ptp_add_event_queue (PTPContainer **events, unsigned int *nrevents, PTPContainer *evt); -int ptp_have_event(PTPParams *params, uint16_t code); int ptp_get_one_event (PTPParams *params, PTPContainer *evt); int ptp_get_one_event_by_type(PTPParams *params, uint16_t code, PTPContainer *event); uint16_t ptp_check_eos_events (PTPParams *params);