From: Uwe Hermann Date: Fri, 20 Mar 2015 13:39:24 +0000 (+0100) Subject: Remove unneeded explicit array size specification. X-Git-Tag: libsigrok-0.4.0~577 X-Git-Url: http://sigrok.org/gitweb/?p=libsigrok.git;a=commitdiff_plain;h=53cda65a6bff58efed83b9a1c9b058f7d713ba19 Remove unneeded explicit array size specification. --- diff --git a/src/hardware/beaglelogic/api.c b/src/hardware/beaglelogic/api.c index d10d071b..6bfb6df1 100644 --- a/src/hardware/beaglelogic/api.c +++ b/src/hardware/beaglelogic/api.c @@ -48,7 +48,7 @@ static const int32_t soft_trigger_matches[] = { }; /* Channels are numbered 0-13 */ -SR_PRIV const char *beaglelogic_channel_names[NUM_CHANNELS + 1] = { +SR_PRIV const char *beaglelogic_channel_names[] = { "P8_45", "P8_46", "P8_43", "P8_44", "P8_41", "P8_42", "P8_39", "P8_40", "P8_27", "P8_29", "P8_28", "P8_30", "P8_21", "P8_20", NULL, }; diff --git a/src/hardware/ikalogic-scanalogic2/api.c b/src/hardware/ikalogic-scanalogic2/api.c index 97a733a1..78b406ea 100644 --- a/src/hardware/ikalogic-scanalogic2/api.c +++ b/src/hardware/ikalogic-scanalogic2/api.c @@ -47,7 +47,7 @@ SR_PRIV const uint64_t sl2_samplerates[NUM_SAMPLERATES] = { SR_MHZ(20), }; -static const char *channel_names[NUM_CHANNELS + 1] = { +static const char *channel_names[] = { "0", "1", "2", "3", NULL, }; diff --git a/src/hardware/link-mso19/api.c b/src/hardware/link-mso19/api.c index 6ee01c86..634d3f97 100644 --- a/src/hardware/link-mso19/api.c +++ b/src/hardware/link-mso19/api.c @@ -38,7 +38,7 @@ static const uint32_t devopts[] = { * * See also: http://www.linkinstruments.com/images/mso19_1113.gif */ -SR_PRIV const char *mso19_channel_names[NUM_CHANNELS + 1] = { +SR_PRIV const char *mso19_channel_names[] = { /* Note: DSO needs to be first. */ "DSO", "0", "1", "2", "3", "4", "5", "6", "7", NULL, }; diff --git a/src/hardware/openbench-logic-sniffer/api.c b/src/hardware/openbench-logic-sniffer/api.c index 9d1e0607..ddced7f3 100644 --- a/src/hardware/openbench-logic-sniffer/api.c +++ b/src/hardware/openbench-logic-sniffer/api.c @@ -70,7 +70,7 @@ static const char *patterns[] = { }; /* Channels are numbered 0-31 (on the PCB silkscreen). */ -SR_PRIV const char *ols_channel_names[NUM_CHANNELS + 1] = { +SR_PRIV const char *ols_channel_names[] = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", diff --git a/src/hardware/openbench-logic-sniffer/protocol.h b/src/hardware/openbench-logic-sniffer/protocol.h index d95ddae2..e75245d4 100644 --- a/src/hardware/openbench-logic-sniffer/protocol.h +++ b/src/hardware/openbench-logic-sniffer/protocol.h @@ -101,7 +101,7 @@ struct dev_context { unsigned char *raw_sample_buf; }; -SR_PRIV extern const char *ols_channel_names[NUM_CHANNELS + 1]; +SR_PRIV extern const char *ols_channel_names[]; SR_PRIV int send_shortcommand(struct sr_serial_dev_inst *serial, uint8_t command); diff --git a/src/hardware/pipistrello-ols/api.c b/src/hardware/pipistrello-ols/api.c index e877234a..31fd9ac2 100644 --- a/src/hardware/pipistrello-ols/api.c +++ b/src/hardware/pipistrello-ols/api.c @@ -61,7 +61,7 @@ static const char *patterns[] = { }; /* Channels are numbered 0-31 (on the PCB silkscreen). */ -SR_PRIV const char *p_ols_channel_names[NUM_CHANNELS + 1] = { +SR_PRIV const char *p_ols_channel_names[] = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", diff --git a/src/hardware/pipistrello-ols/protocol.h b/src/hardware/pipistrello-ols/protocol.h index 869815a7..12a7e69f 100644 --- a/src/hardware/pipistrello-ols/protocol.h +++ b/src/hardware/pipistrello-ols/protocol.h @@ -117,7 +117,7 @@ struct dev_context { unsigned char *raw_sample_buf; }; -SR_PRIV extern const char *p_ols_channel_names[NUM_CHANNELS + 1]; +SR_PRIV extern const char *p_ols_channel_names[]; 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); SR_PRIV int p_ols_open(struct dev_context *devc);