Skip to content

Commit

Permalink
ptp2: remove unused function ptp_have_event
Browse files Browse the repository at this point in the history
  • Loading branch information
axxel authored and msmeissn committed Sep 25, 2024
1 parent f4e853a commit d75762e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
23 changes: 0 additions & 23 deletions camlibs/ptp2/ptp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;i<params->nrofevents;i++)
if (params->events[i].Code == code)
return 1;
return 0;
}

/**
* ptp_canon_eos_getevent:
*
Expand Down
1 change: 0 additions & 1 deletion camlibs/ptp2/ptp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d75762e

Please sign in to comment.