X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=source%2Fdrv-protocol.c;h=74f8fb81f552c8b846fcbdb5615da3974fbe37fd;hb=54207903a78f98c62a6fc7fb37e51c1f22187ba4;hp=b7b359d2e8020d1e1cb1788b469c1c989360203c;hpb=126eded091582d9b988d793141d6c428bc38457d;p=sigrok-util.git diff --git a/source/drv-protocol.c b/source/drv-protocol.c index b7b359d..74f8fb8 100644 --- a/source/drv-protocol.c +++ b/source/drv-protocol.c @@ -1,5 +1,5 @@ /* - * This file is part of the sigrok project. + * This file is part of the libsigrok project. * * Copyright (C) ${year} ${author} <${email}> * @@ -17,11 +17,7 @@ * along with this program. If not, see . */ -#include -#include -#include "libsigrok.h" -#include "libsigrok-internal.h" -#include "config.h" +#include #include "protocol.h" SR_PRIV int ${lib}_receive_data(int fd, int revents, void *cb_data) @@ -29,6 +25,8 @@ SR_PRIV int ${lib}_receive_data(int fd, int revents, void *cb_data) const struct sr_dev_inst *sdi; struct dev_context *devc; + (void)fd; + if (!(sdi = cb_data)) return TRUE;