From: Uwe Hermann Date: Fri, 20 Mar 2015 13:36:47 +0000 (+0100) Subject: Various minor whitespace fixes. X-Git-Tag: libsigrok-0.4.0~578 X-Git-Url: https://sigrok.org/gitweb/?a=commitdiff_plain;h=1beccaed464a4d92a070988a0331fe399f9f7a7a;hp=e8be616955f2bc4e2c72fc55d899056ad68fb75c;p=libsigrok.git Various minor whitespace fixes. --- diff --git a/src/device.c b/src/device.c index b1c7eae1..3eef7b9e 100644 --- a/src/device.c +++ b/src/device.c @@ -544,7 +544,6 @@ SR_API const char *sr_dev_inst_connid_get(const struct sr_dev_inst *sdi) } #endif - #ifdef HAVE_LIBUSB_1_0 if ((!sdi->connection_id) && (sdi->inst_type == SR_INST_USB)) { /* connection_id isn't populated, let's do that here. */ diff --git a/src/hardware/asix-sigma/asix-sigma.c b/src/hardware/asix-sigma/asix-sigma.c index dac6e011..6268747a 100644 --- a/src/hardware/asix-sigma/asix-sigma.c +++ b/src/hardware/asix-sigma/asix-sigma.c @@ -783,7 +783,6 @@ static int convert_trigger(const struct sr_dev_inst *sdi) } } - return SR_OK; } @@ -949,7 +948,6 @@ static int get_trigger_offset(uint8_t *samples, uint16_t last_sample, return i & 0x7; } - /* * Return the timestamp of "DRAM cluster". */ diff --git a/src/hardware/atten-pps3xxx/api.c b/src/hardware/atten-pps3xxx/api.c index 359121f0..ceae0274 100644 --- a/src/hardware/atten-pps3xxx/api.c +++ b/src/hardware/atten-pps3xxx/api.c @@ -75,7 +75,6 @@ static struct pps_model models[] = { }, }; - SR_PRIV struct sr_dev_driver atten_pps3203_driver_info; static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx) diff --git a/src/hardware/atten-pps3xxx/protocol.c b/src/hardware/atten-pps3xxx/protocol.c index e7d9d810..297fe831 100644 --- a/src/hardware/atten-pps3xxx/protocol.c +++ b/src/hardware/atten-pps3xxx/protocol.c @@ -164,4 +164,3 @@ SR_PRIV int atten_pps3xxx_receive_data(int fd, int revents, void *cb_data) return TRUE; } - diff --git a/src/hardware/cem-dt-885x/api.c b/src/hardware/cem-dt-885x/api.c index 1e499802..e58598f1 100644 --- a/src/hardware/cem-dt-885x/api.c +++ b/src/hardware/cem-dt-885x/api.c @@ -21,6 +21,7 @@ #include "protocol.h" #define SERIALCOMM "9600/8n1" + /* 23ms is the longest interval between tokens. */ #define MAX_SCAN_TIME 25 * 1000 @@ -66,8 +67,8 @@ static const char *data_sources[] = { "Live", "Memory", }; -SR_PRIV struct sr_dev_driver cem_dt_885x_driver_info; +SR_PRIV struct sr_dev_driver cem_dt_885x_driver_info; static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx) { diff --git a/src/hardware/cem-dt-885x/protocol.c b/src/hardware/cem-dt-885x/protocol.c index dc005f63..bbb1a03a 100644 --- a/src/hardware/cem-dt-885x/protocol.c +++ b/src/hardware/cem-dt-885x/protocol.c @@ -404,7 +404,6 @@ SR_PRIV int cem_dt_885x_receive_data(int fd, int revents, void *cb_data) return TRUE; } - static int wait_for_token(const struct sr_dev_inst *sdi, int8_t *tokens, int timeout) { struct dev_context *devc; diff --git a/src/hardware/demo/demo.c b/src/hardware/demo/demo.c index 0704cde2..f3c8bb4a 100644 --- a/src/hardware/demo/demo.c +++ b/src/hardware/demo/demo.c @@ -183,7 +183,6 @@ SR_PRIV struct sr_dev_driver demo_driver_info; static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data); - static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx) { return std_init(sr_ctx, di, LOG_PREFIX); diff --git a/src/hardware/fluke-dmm/fluke.c b/src/hardware/fluke-dmm/fluke.c index f86b7d7b..df0f2461 100644 --- a/src/hardware/fluke-dmm/fluke.c +++ b/src/hardware/fluke-dmm/fluke.c @@ -386,7 +386,6 @@ static void handle_qm_19x_data(const struct sr_dev_inst *sdi, char **tokens) /* Don't have valid metadata yet. */ return; - if (devc->mq == SR_MQ_RESISTANCE && isnan(fvalue)) fvalue = INFINITY; else if (devc->mq == SR_MQ_CONTINUITY) { diff --git a/src/hardware/gmc-mh-1x-2x/api.c b/src/hardware/gmc-mh-1x-2x/api.c index bf0b3691..69b26794 100644 --- a/src/hardware/gmc-mh-1x-2x/api.c +++ b/src/hardware/gmc-mh-1x-2x/api.c @@ -58,7 +58,6 @@ static const uint32_t devopts_bd[] = { SR_CONF_POWER_OFF | SR_CONF_GET | SR_CONF_SET, }; - /* TODO: * - For the 29S SR_CONF_ENERGYMETER, too. * - SR_CONF_PATTERN_MODE for some 2x devices diff --git a/src/hardware/gmc-mh-1x-2x/protocol.c b/src/hardware/gmc-mh-1x-2x/protocol.c index 11ca021e..ad7ae567 100644 --- a/src/hardware/gmc-mh-1x-2x/protocol.c +++ b/src/hardware/gmc-mh-1x-2x/protocol.c @@ -602,7 +602,6 @@ static void decode_rs_2x_TR2(uint8_t rs, struct dev_context *devc) devc->scale *= -1.0; } - /** * Decode special chars (Metrahit 2x). * @@ -1497,7 +1496,6 @@ SR_PRIV const char *gmc_model_str(enum model mcode) } } - /** @copydoc sr_dev_driver.config_set */ SR_PRIV int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi, diff --git a/src/hardware/kecheng-kc-330b/api.c b/src/hardware/kecheng-kc-330b/api.c index 37d681cb..8033e960 100644 --- a/src/hardware/kecheng-kc-330b/api.c +++ b/src/hardware/kecheng-kc-330b/api.c @@ -62,7 +62,6 @@ static const char *data_sources[] = { SR_PRIV struct sr_dev_driver kecheng_kc_330b_driver_info; - static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx) { return std_init(sr_ctx, di, LOG_PREFIX); @@ -236,7 +235,6 @@ static int cleanup(const struct sr_dev_driver *di) /* Can get called on an unused driver, doesn't matter. */ return SR_OK; - ret = std_dev_clear(di, NULL); g_free(drvc); diff --git a/src/hardware/lascar-el-usb/api.c b/src/hardware/lascar-el-usb/api.c index fc65b228..3213a684 100644 --- a/src/hardware/lascar-el-usb/api.c +++ b/src/hardware/lascar-el-usb/api.c @@ -152,7 +152,6 @@ static int cleanup(const struct sr_dev_driver *di) /* Can get called on an unused driver, doesn't matter. */ return SR_OK; - ret = std_dev_clear(di, NULL); g_free(drvc); @@ -390,7 +389,6 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data) libusb_control_transfer(usb->devhdl, LIBUSB_REQUEST_TYPE_VENDOR, 0x02, 0x0001, 0x00, NULL, 0, 50); - /* Flush input. The F321 requires this. */ while (libusb_bulk_transfer(usb->devhdl, LASCAR_EP_IN, resp, 256, &ret, 5) == 0 && ret > 0) diff --git a/src/hardware/lascar-el-usb/protocol.c b/src/hardware/lascar-el-usb/protocol.c index eac2b18a..484ab0fc 100644 --- a/src/hardware/lascar-el-usb/protocol.c +++ b/src/hardware/lascar-el-usb/protocol.c @@ -54,7 +54,6 @@ static const struct elusb_profile profiles[] = { { 0, NULL, 0 } }; - static libusb_device_handle *lascar_open(struct libusb_device *dev) { libusb_device_handle *dev_hdl; diff --git a/src/hardware/motech-lps-30x/api.c b/src/hardware/motech-lps-30x/api.c index d040fe6e..c23f84a1 100644 --- a/src/hardware/motech-lps-30x/api.c +++ b/src/hardware/motech-lps-30x/api.c @@ -441,7 +441,6 @@ static GSList *do_scan(lps_modelid modelid, struct sr_dev_driver *drv, GSList *o goto exit_err; } - g_strstrip(buf); verstr = buf + 4; } diff --git a/src/hardware/motech-lps-30x/protocol.c b/src/hardware/motech-lps-30x/protocol.c index 78d822f0..b97ce3b6 100644 --- a/src/hardware/motech-lps-30x/protocol.c +++ b/src/hardware/motech-lps-30x/protocol.c @@ -131,7 +131,6 @@ static void process_line(struct sr_dev_inst *sdi) devc->buflen = 0; } - SR_PRIV int motech_lps_30x_receive_data(int fd, int revents, void *cb_data) { struct sr_dev_inst *sdi; diff --git a/src/hardware/norma-dmm/api.c b/src/hardware/norma-dmm/api.c index 6fe8e39d..9df1546f 100644 --- a/src/hardware/norma-dmm/api.c +++ b/src/hardware/norma-dmm/api.c @@ -321,7 +321,6 @@ SR_PRIV struct sr_dev_driver norma_dmm_driver_info = { .priv = NULL, }; - SR_PRIV struct sr_dev_driver siemens_b102x_driver_info = { .name = "siemens-b102x", .longname = "Siemens B102x DMMs", diff --git a/src/hardware/openbench-logic-sniffer/protocol.h b/src/hardware/openbench-logic-sniffer/protocol.h index c0f101dc..d95ddae2 100644 --- a/src/hardware/openbench-logic-sniffer/protocol.h +++ b/src/hardware/openbench-logic-sniffer/protocol.h @@ -101,7 +101,6 @@ struct dev_context { unsigned char *raw_sample_buf; }; - SR_PRIV extern const char *ols_channel_names[NUM_CHANNELS + 1]; SR_PRIV int send_shortcommand(struct sr_serial_dev_inst *serial, diff --git a/src/hardware/pipistrello-ols/api.c b/src/hardware/pipistrello-ols/api.c index b23ccf70..e877234a 100644 --- a/src/hardware/pipistrello-ols/api.c +++ b/src/hardware/pipistrello-ols/api.c @@ -229,7 +229,6 @@ static int cleanup(const struct sr_dev_driver *di) return dev_clear(di); } - static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi, const struct sr_channel_group *cg) { @@ -469,7 +468,6 @@ static int dev_close(struct sr_dev_inst *sdi) return ret; } - static int set_trigger(const struct sr_dev_inst *sdi, int stage) { struct dev_context *devc; @@ -706,8 +704,6 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, return SR_OK; } - - static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data) { struct dev_context *devc; diff --git a/src/hardware/pipistrello-ols/protocol.c b/src/hardware/pipistrello-ols/protocol.c index f3bd15b0..5b0bcfb9 100644 --- a/src/hardware/pipistrello-ols/protocol.c +++ b/src/hardware/pipistrello-ols/protocol.c @@ -384,7 +384,6 @@ SR_PRIV int p_ols_set_samplerate(const struct sr_dev_inst *sdi, return SR_OK; } - SR_PRIV int p_ols_receive_data(int fd, int revents, void *cb_data) { struct dev_context *devc; diff --git a/src/hardware/pipistrello-ols/protocol.h b/src/hardware/pipistrello-ols/protocol.h index 84171c35..869815a7 100644 --- a/src/hardware/pipistrello-ols/protocol.h +++ b/src/hardware/pipistrello-ols/protocol.h @@ -36,7 +36,6 @@ #define FTDI_BUF_SIZE (16 * 1024) - #define NUM_CHANNELS 32 #define NUM_TRIGGER_STAGES 4 #define CLOCK_RATE SR_MHZ(100) @@ -118,7 +117,6 @@ struct dev_context { unsigned char *raw_sample_buf; }; - SR_PRIV extern const char *p_ols_channel_names[NUM_CHANNELS + 1]; SR_PRIV int write_shortcommand(struct dev_context *devc, uint8_t command); SR_PRIV int write_longcommand(struct dev_context *devc, uint8_t command, uint8_t *data); diff --git a/src/hardware/scpi-pps/profiles.c b/src/hardware/scpi-pps/profiles.c index 5735234e..e7d3119a 100644 --- a/src/hardware/scpi-pps/profiles.c +++ b/src/hardware/scpi-pps/profiles.c @@ -302,7 +302,6 @@ struct scpi_command philips_pm2800_cmd[] = { { SCPI_CMD_GET_OVER_CURRENT_PROTECTION_ACTIVE, ":SOUR:CURR:PROT:TRIP?" }, }; - SR_PRIV const struct scpi_pps pps_profiles[] = { /* HP 6632B */ { "HP", "6632B", 0, @@ -350,5 +349,5 @@ SR_PRIV const struct scpi_pps pps_profiles[] = { philips_pm2800_probe_channels, }, }; -SR_PRIV unsigned int num_pps_profiles = ARRAY_SIZE(pps_profiles); +SR_PRIV unsigned int num_pps_profiles = ARRAY_SIZE(pps_profiles); diff --git a/src/hardware/testo/protocol.c b/src/hardware/testo/protocol.c index 1505e5bc..15717c02 100644 --- a/src/hardware/testo/protocol.c +++ b/src/hardware/testo/protocol.c @@ -51,7 +51,6 @@ SR_PRIV int testo_set_serial_params(struct sr_usb_dev_inst *usb) return SR_OK; } - /* Due to the modular nature of the Testo hardware, you can't assume * which measurements the device will supply. Fetch a single result * set synchronously to see which measurements it has. */ @@ -289,4 +288,3 @@ SR_PRIV void testo_receive_packet(const struct sr_dev_inst *sdi) g_slist_free(analog.channels); } } - diff --git a/src/hardware/testo/protocol.h b/src/hardware/testo/protocol.h index f61fe2d4..a61a9dce 100644 --- a/src/hardware/testo/protocol.h +++ b/src/hardware/testo/protocol.h @@ -80,4 +80,5 @@ SR_PRIV int testo_request_packet(const struct sr_dev_inst *sdi); SR_PRIV gboolean testo_check_packet_prefix(unsigned char *buf, int len); SR_PRIV uint16_t crc16_mcrf4xx(uint16_t crc, uint8_t *data, size_t len); SR_PRIV void testo_receive_packet(const struct sr_dev_inst *sdi); + #endif diff --git a/src/hardware/uni-t-ut32x/api.c b/src/hardware/uni-t-ut32x/api.c index a8c380d9..3b33df9a 100644 --- a/src/hardware/uni-t-ut32x/api.c +++ b/src/hardware/uni-t-ut32x/api.c @@ -41,7 +41,6 @@ static const char *data_sources[] = { SR_PRIV struct sr_dev_driver uni_t_ut32x_driver_info; - static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx) { return std_init(sr_ctx, di, LOG_PREFIX); @@ -182,7 +181,6 @@ static int cleanup(const struct sr_dev_driver *di) /* Can get called on an unused driver, doesn't matter. */ return SR_OK; - ret = std_dev_clear(di, NULL); g_free(drvc); diff --git a/src/hardware/uni-t-ut32x/protocol.c b/src/hardware/uni-t-ut32x/protocol.c index 590d3fd5..3bbdd99b 100644 --- a/src/hardware/uni-t-ut32x/protocol.c +++ b/src/hardware/uni-t-ut32x/protocol.c @@ -238,4 +238,3 @@ SR_PRIV int uni_t_ut32x_handle_events(int fd, int revents, void *cb_data) return TRUE; } - diff --git a/src/hardware/victor-dmm/api.c b/src/hardware/victor-dmm/api.c index 85874b12..9aa0019e 100644 --- a/src/hardware/victor-dmm/api.c +++ b/src/hardware/victor-dmm/api.c @@ -37,6 +37,7 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data); static const uint32_t drvopts[] = { SR_CONF_MULTIMETER, }; + static const uint32_t scanopts[] = { SR_CONF_CONN, }; @@ -195,7 +196,6 @@ static int cleanup(const struct sr_dev_driver *di) /* Can get called on an unused driver, doesn't matter. */ return SR_OK; - ret = std_dev_clear(di, NULL); g_free(drvc); diff --git a/src/hardware/yokogawa-dlm/protocol.h b/src/hardware/yokogawa-dlm/protocol.h index d38620f8..aa62f321 100644 --- a/src/hardware/yokogawa-dlm/protocol.h +++ b/src/hardware/yokogawa-dlm/protocol.h @@ -41,7 +41,6 @@ #define DLM_DIVISION_FOR_WORD_FORMAT (3200) #define DLM_DIVISION_FOR_BYTE_FORMAT (12.5) - enum trigger_slopes { SLOPE_POSITIVE, SLOPE_NEGATIVE diff --git a/src/hardware/yokogawa-dlm/protocol_wrappers.c b/src/hardware/yokogawa-dlm/protocol_wrappers.c index a4fc2cd7..afe4efa3 100644 --- a/src/hardware/yokogawa-dlm/protocol_wrappers.c +++ b/src/hardware/yokogawa-dlm/protocol_wrappers.c @@ -253,7 +253,6 @@ int dlm_digital_pod_state_set(struct sr_scpi_dev_inst *scpi, int pod, return sr_scpi_send(scpi, ":LOGIC:MODE OFF"); } - int dlm_response_headers_set(struct sr_scpi_dev_inst *scpi, const gboolean value) { @@ -268,7 +267,6 @@ int dlm_acquisition_stop(struct sr_scpi_dev_inst *scpi) return sr_scpi_send(scpi, ":STOP"); } - int dlm_acq_length_get(struct sr_scpi_dev_inst *scpi, uint32_t *response) { diff --git a/src/input/input.c b/src/input/input.c index 9ace7f5e..b078f5a6 100644 --- a/src/input/input.c +++ b/src/input/input.c @@ -590,5 +590,4 @@ SR_API void sr_input_free(const struct sr_input *in) g_free((gpointer)in); } - /** @} */ diff --git a/src/input/vcd.c b/src/input/vcd.c index e69a8071..ad0ba7f0 100644 --- a/src/input/vcd.c +++ b/src/input/vcd.c @@ -87,7 +87,6 @@ struct vcd_channel { gchar *identifier; }; - /* * Reads a single VCD section from input file and parses it to name/contents. * e.g. $timescale 1ps $end => "timescale" "1ps" diff --git a/src/input/wav.c b/src/input/wav.c index 0c23010e..88ddd7a8 100644 --- a/src/input/wav.c +++ b/src/input/wav.c @@ -73,7 +73,6 @@ static int parse_wav_header(GString *buf, struct context *inc) return SR_ERR_DATA; } - if (fmt_code == WAVE_FORMAT_PCM) { } else if (fmt_code == WAVE_FORMAT_IEEE_FLOAT) { if (unitsize != 4) { @@ -370,4 +369,3 @@ SR_PRIV struct sr_input_module input_wav = { .receive = receive, .end = end, }; - diff --git a/src/lcr/es51919.c b/src/lcr/es51919.c index c6fddc11..d7290c76 100644 --- a/src/lcr/es51919.c +++ b/src/lcr/es51919.c @@ -305,7 +305,6 @@ static int send_config_update_key(struct sr_dev_inst *sdi, uint32_t key, sr_config_free(cfg); return ret; - } /* @@ -467,7 +466,7 @@ static int parse_mq(const uint8_t *pkt, int is_secondary, int is_parallel) switch (is_secondary << 8 | buf[0]) { case 0x001: - return is_parallel ? + return is_parallel ? SR_MQ_PARALLEL_INDUCTANCE : SR_MQ_SERIES_INDUCTANCE; case 0x002: return is_parallel ? @@ -607,7 +606,6 @@ static unsigned int parse_model(const uint8_t *pkt) return MODEL_PAR; else return MODEL_SER; - } static gboolean packet_valid(const uint8_t *pkt) diff --git a/src/output/ascii.c b/src/output/ascii.c index c6b4290f..d2ad3aca 100644 --- a/src/output/ascii.c +++ b/src/output/ascii.c @@ -258,5 +258,3 @@ SR_PRIV struct sr_output_module output_ascii = { .receive = receive, .cleanup = cleanup, }; - - diff --git a/src/output/gnuplot.c b/src/output/gnuplot.c index 631fefda..053f0424 100644 --- a/src/output/gnuplot.c +++ b/src/output/gnuplot.c @@ -43,7 +43,6 @@ static const char *gnuplot_header2 = "\ # -----------------------------------------------------------------------------\n\ # 0\t\tSample counter (for internal gnuplot purposes)\n"; - static int init(struct sr_output *o, GHashTable *options) { struct context *ctx; diff --git a/src/output/hex.c b/src/output/hex.c index 6b24fdf5..bad60751 100644 --- a/src/output/hex.c +++ b/src/output/hex.c @@ -258,4 +258,3 @@ SR_PRIV struct sr_output_module output_hex = { .receive = receive, .cleanup = cleanup, }; - diff --git a/src/output/srzip.c b/src/output/srzip.c index 356a8ab4..84755a3d 100644 --- a/src/output/srzip.c +++ b/src/output/srzip.c @@ -318,4 +318,3 @@ SR_PRIV struct sr_output_module output_srzip = { .receive = receive, .cleanup = cleanup, }; - diff --git a/src/output/wav.c b/src/output/wav.c index 45854caa..e9c7d6fd 100644 --- a/src/output/wav.c +++ b/src/output/wav.c @@ -357,4 +357,3 @@ SR_PRIV struct sr_output_module output_wav = { .receive = receive, .cleanup = cleanup, }; - diff --git a/src/scpi/scpi_usbtmc_libusb.c b/src/scpi/scpi_usbtmc_libusb.c index 535ce54b..c143e599 100644 --- a/src/scpi/scpi_usbtmc_libusb.c +++ b/src/scpi/scpi_usbtmc_libusb.c @@ -92,7 +92,6 @@ enum { #define EOM 0x01 #define TERM_CHAR_ENABLED 0x02 - static GSList *scpi_usbtmc_libusb_scan(struct drv_context *drvc) { struct libusb_device **devlist; diff --git a/src/session.c b/src/session.c index fd24c26c..ce72a9b0 100644 --- a/src/session.c +++ b/src/session.c @@ -447,6 +447,7 @@ static int verify_trigger(struct sr_trigger *trigger) return SR_OK; } + /** * Start a session. * diff --git a/src/session_file.c b/src/session_file.c index abe002d3..91d4d777 100644 --- a/src/session_file.c +++ b/src/session_file.c @@ -49,7 +49,6 @@ extern SR_PRIV struct sr_dev_driver session_driver; static int session_driver_initialized = 0; - /** @private */ SR_PRIV int sr_sessionfile_check(const char *filename) { diff --git a/src/soft-trigger.c b/src/soft-trigger.c index 107e6219..27c71b61 100644 --- a/src/soft-trigger.c +++ b/src/soft-trigger.c @@ -219,4 +219,3 @@ SR_PRIV int soft_trigger_logic_check(struct soft_trigger_logic *stl, return offset; } -