Bug #4688
closedInverted logic in api_epg.c
100%
Description
Function htsmsg_get_u32() returns zero on success and an error number on failure. However there are two occurrences in api_epg.c where an error exit is taken when zero is returned.
--- api_epg.c.old 2017-10-25 12:49:13.871382555 0100
++ api_epg.c 2017-10-25 12:51:02.138515653 +0100@ -528,7 +528,7
@
epg_broadcast_t *e;
char *lang;
- if (!htsmsg_get_u32(args, "eventId", &id))
+ if (htsmsg_get_u32(args, "eventId", &id))
return -EINVAL;
/* Main Job */
@ -558,7 +558,7
@
epg_episode_t *ep, *ep2;
char *lang;
- if (!htsmsg_get_u32(args, "eventId", &id))
+ if (htsmsg_get_u32(args, "eventId", &id))
return -EINVAL;
/* Main Job */
I have checked all other uses of this function and these are the only cases.
Apologies for not submitting a PR; my limited git knowledge won't handle two PRs outstanding at the same time.