From: Uwe Hermann Date: Wed, 31 Jul 2013 11:09:48 +0000 (+0200) Subject: Various cosmetics, whitespace, consistency fixes. X-Git-Tag: libsigrok-0.2.1~20 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=ce4d26ddf96ceb62ada8ccd25347976ac5e4029f;p=libsigrok.git Various cosmetics, whitespace, consistency fixes. --- diff --git a/hardware/agilent-dmm/agilent-dmm.h b/hardware/agilent-dmm/agilent-dmm.h index ec18c3da..43fed240 100644 --- a/hardware/agilent-dmm/agilent-dmm.h +++ b/hardware/agilent-dmm/agilent-dmm.h @@ -17,9 +17,8 @@ * along with this program. If not, see . */ - -#ifndef LIBSIGROK_AGILENT_DMM_H -#define LIBSIGROK_AGILENT_DMM_H +#ifndef LIBSIGROK_HARDWARE_AGILENT_DMM_AGILENT_DMM_H +#define LIBSIGROK_HARDWARE_AGILENT_DMM_AGILENT_DMM_H /* Message logging helpers with subsystem-specific prefix string. */ #define LOG_PREFIX "agilent-dmm: " @@ -85,4 +84,4 @@ struct agdmm_recv { SR_PRIV int agdmm_receive_data(int fd, int revents, void *cb_data); -#endif /* LIBSIGROK_AGILENT_DMM_H */ +#endif diff --git a/hardware/agilent-dmm/sched.c b/hardware/agilent-dmm/sched.c index da15e4d9..290a2e7a 100644 --- a/hardware/agilent-dmm/sched.c +++ b/hardware/agilent-dmm/sched.c @@ -144,7 +144,7 @@ static int agdmm_send(const struct sr_dev_inst *sdi, const char *cmd) sr_err("Failed to send: %s.", strerror(errno)); return SR_ERR; } - + return SR_OK; } diff --git a/hardware/asix-sigma/asix-sigma.c b/hardware/asix-sigma/asix-sigma.c index f542b536..52224271 100644 --- a/hardware/asix-sigma/asix-sigma.c +++ b/hardware/asix-sigma/asix-sigma.c @@ -383,7 +383,7 @@ static int bin2bitbang(const char *filename, static void clear_helper(void *priv) { struct dev_context *devc; - + devc = priv; ftdi_deinit(&devc->ftdic); diff --git a/hardware/cem-dt-885x/api.c b/hardware/cem-dt-885x/api.c index 8a9d69c4..62001a5b 100644 --- a/hardware/cem-dt-885x/api.c +++ b/hardware/cem-dt-885x/api.c @@ -144,11 +144,7 @@ static GSList *scan(GSList *options) static GSList *dev_list(void) { - struct drv_context *drvc; - - drvc = di->priv; - - return drvc->instances; + return ((struct drv_context *)(di->priv))->instances; } static int dev_clear(void) diff --git a/hardware/cem-dt-885x/protocol.c b/hardware/cem-dt-885x/protocol.c index 74531b1e..3c2b866d 100644 --- a/hardware/cem-dt-885x/protocol.c +++ b/hardware/cem-dt-885x/protocol.c @@ -544,7 +544,6 @@ SR_PRIV int cem_dt_885x_weight_freq_get(const struct sr_dev_inst *sdi) return SR_MQFLAG_SPL_FREQ_WEIGHT_C; } else return cur_setting; - } SR_PRIV int cem_dt_885x_weight_freq_set(const struct sr_dev_inst *sdi, int freqw) @@ -607,7 +606,6 @@ SR_PRIV int cem_dt_885x_weight_time_get(const struct sr_dev_inst *sdi) return SR_MQFLAG_SPL_TIME_WEIGHT_S; } else return cur_setting; - } SR_PRIV int cem_dt_885x_weight_time_set(const struct sr_dev_inst *sdi, int timew) diff --git a/hardware/colead-slm/protocol.c b/hardware/colead-slm/protocol.c index 9a9d10c8..e10fc37e 100644 --- a/hardware/colead-slm/protocol.c +++ b/hardware/colead-slm/protocol.c @@ -25,7 +25,6 @@ #include #include - static void process_packet(const struct sr_dev_inst *sdi) { struct dev_context *devc; @@ -232,4 +231,3 @@ SR_PRIV int colead_slm_receive_data(int fd, int revents, void *cb_data) return TRUE; } - diff --git a/hardware/fluke-dmm/fluke-dmm.h b/hardware/fluke-dmm/fluke-dmm.h index c2806391..f1ec8ce9 100644 --- a/hardware/fluke-dmm/fluke-dmm.h +++ b/hardware/fluke-dmm/fluke-dmm.h @@ -17,9 +17,8 @@ * along with this program. If not, see . */ - -#ifndef LIBSIGROK_FLUKE_DMM_H -#define LIBSIGROK_FLUKE_DMM_H +#ifndef LIBSIGROK_HARDWARE_FLUKE_DMM_FLUKE_DMM_H +#define LIBSIGROK_HARDWARE_FLUKE_DMM_FLUKE_DMM_H /* Message logging helpers with subsystem-specific prefix string. */ #define LOG_PREFIX "fluke-dmm: " @@ -73,4 +72,4 @@ struct dev_context { SR_PRIV int fluke_receive_data(int fd, int revents, void *cb_data); -#endif /* LIBSIGROK_FLUKE_DMM_H */ +#endif diff --git a/hardware/fluke-dmm/fluke.c b/hardware/fluke-dmm/fluke.c index 848e03e5..d960228a 100644 --- a/hardware/fluke-dmm/fluke.c +++ b/hardware/fluke-dmm/fluke.c @@ -26,7 +26,6 @@ #include "libsigrok-internal.h" #include "fluke-dmm.h" - static struct sr_datafeed_analog *handle_qm_18x(const struct sr_dev_inst *sdi, char **tokens) { @@ -532,5 +531,3 @@ SR_PRIV int fluke_receive_data(int fd, int revents, void *cb_data) return TRUE; } - - diff --git a/hardware/hantek-dso/dso.h b/hardware/hantek-dso/dso.h index 9ca0a900..2c4f4c39 100644 --- a/hardware/hantek-dso/dso.h +++ b/hardware/hantek-dso/dso.h @@ -19,8 +19,8 @@ * along with this program. If not, see . */ -#ifndef LIBSIGROK_HARDWARE_HANTEK_DSO_H -#define LIBSIGROK_HARDWARE_HANTEK_DSO_H +#ifndef LIBSIGROK_HARDWARE_HANTEK_DSO_DSO_H +#define LIBSIGROK_HARDWARE_HANTEK_DSO_DSO_H /* Message logging helpers with subsystem-specific prefix string. */ #define LOG_PREFIX "hantek-dso: " @@ -76,8 +76,8 @@ enum dso_commands { CMD_GET_CAPTURESTATE, CMD_SET_VOLTAGE, /* unused */ - cmdSetLogicalData, - cmdGetLogicalData, + CMD_SET_LOGICALDATA, + CMD_GET_LOGICALDATA, }; /* Must match the coupling table. */ diff --git a/hardware/kecheng-kc-330b/api.c b/hardware/kecheng-kc-330b/api.c index 3b6544ac..02f4b0e0 100644 --- a/hardware/kecheng-kc-330b/api.c +++ b/hardware/kecheng-kc-330b/api.c @@ -168,11 +168,7 @@ static GSList *scan(GSList *options) static GSList *dev_list(void) { - struct drv_context *drvc; - - drvc = di->priv; - - return drvc->instances; + return ((struct drv_context *)(di->priv))->instances; } static int dev_clear(void) diff --git a/hardware/lascar-el-usb/protocol.c b/hardware/lascar-el-usb/protocol.c index 707a3b61..3f9cbc88 100644 --- a/hardware/lascar-el-usb/protocol.c +++ b/hardware/lascar-el-usb/protocol.c @@ -658,4 +658,3 @@ SR_PRIV int lascar_stop_logging(const struct sr_dev_inst *sdi) return ret; } - diff --git a/hardware/rigol-ds1xx2/protocol.c b/hardware/rigol-ds1xx2/protocol.c index 942aecfd..001d671b 100644 --- a/hardware/rigol-ds1xx2/protocol.c +++ b/hardware/rigol-ds1xx2/protocol.c @@ -288,4 +288,3 @@ SR_PRIV int rigol_ds1xx2_get_dev_cfg(const struct sr_dev_inst *sdi) return SR_OK; } -