X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=source%2Fdrv-protocol.c;h=b331b6baa699f97744bbfaa0a28f1e366ab1ffea;hb=ce4722e3215c0e94497312a30f792226eefd7571;hp=47ade0d45250e4721b683ba4454cd0c22f0e5d9b;hpb=28fca3a8f9e73c86d27f20065e51c69a9118a60e;p=sigrok-util.git diff --git a/source/drv-protocol.c b/source/drv-protocol.c index 47ade0d..b331b6b 100644 --- a/source/drv-protocol.c +++ b/source/drv-protocol.c @@ -1,7 +1,7 @@ /* * This file is part of the libsigrok project. * - * Copyright (C) ${year} ${author} <${email}> + * Copyright (C) {year} {author} <{email}> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,24 +17,27 @@ * along with this program. If not, see . */ +#include #include "protocol.h" -SR_PRIV int ${lib}_receive_data(int fd, int revents, void *cb_data) -{ +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)) + sdi = cb_data; + if (!sdi) return TRUE; - if (!(devc = sdi->priv)) + devc = sdi->priv; + if (!devc) return TRUE; - if (revents == G_IO_IN) { + if (revents == G_IO_IN) {{ /* TODO */ - } + }} return TRUE; -} +}}