From: Uwe Hermann Date: Tue, 25 Dec 2012 23:12:52 +0000 (+0100) Subject: Shorten probe_names[] arrays everywhere. X-Git-Tag: dsupstream~406 X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=commitdiff_plain;h=786934010365a0b33aa8a32a7dc62a2975dba4c7 Shorten probe_names[] arrays everywhere. Also, NULL-terminate all of them. --- diff --git a/hardware/alsa/api.c b/hardware/alsa/api.c index 77025c13..a73bfefa 100644 --- a/hardware/alsa/api.c +++ b/hardware/alsa/api.c @@ -41,8 +41,7 @@ static const int hwcaps[] = { }; static const char *probe_names[] = { - "Channel 0", - "Channel 1", + "Channel 0", "Channel 1", NULL, }; diff --git a/hardware/asix-sigma/asix-sigma.c b/hardware/asix-sigma/asix-sigma.c index b4a9ebd4..27a91226 100644 --- a/hardware/asix-sigma/asix-sigma.c +++ b/hardware/asix-sigma/asix-sigma.c @@ -64,22 +64,8 @@ static const uint64_t supported_samplerates[] = { * (the cable has two additional GND pins, and a TI and TO pin) */ static const char *probe_names[NUM_PROBES + 1] = { - "1", - "2", - "3", - "4", - "5", - "6", - "7", - "8", - "9", - "10", - "11", - "12", - "13", - "14", - "15", - "16", + "1", "2", "3", "4", "5", "6", "7", "8", + "9", "10", "11", "12", "13", "14", "15", "16", NULL, }; diff --git a/hardware/chronovu-la8/protocol.c b/hardware/chronovu-la8/protocol.c index 9b25cd7f..5eb781e1 100644 --- a/hardware/chronovu-la8/protocol.c +++ b/hardware/chronovu-la8/protocol.c @@ -26,14 +26,7 @@ /* Probes are numbered 0-7. */ SR_PRIV const char *probe_names[NUM_PROBES + 1] = { - "0", - "1", - "2", - "3", - "4", - "5", - "6", - "7", + "0", "1", "2", "3", "4", "5", "6", "7", NULL, }; diff --git a/hardware/demo/demo.c b/hardware/demo/demo.c index aac585a2..7238d84e 100644 --- a/hardware/demo/demo.c +++ b/hardware/demo/demo.c @@ -111,14 +111,7 @@ static const char *pattern_strings[] = { /* We name the probes 0-7 on our demo driver. */ static const char *probe_names[NUM_PROBES + 1] = { - "0", - "1", - "2", - "3", - "4", - "5", - "6", - "7", + "0", "1", "2", "3", "4", "5", "6", "7", NULL, }; diff --git a/hardware/fx2lafw/fx2lafw.c b/hardware/fx2lafw/fx2lafw.c index a9bc899e..da72399c 100644 --- a/hardware/fx2lafw/fx2lafw.c +++ b/hardware/fx2lafw/fx2lafw.c @@ -93,7 +93,8 @@ static const int hwcaps[] = { static const char *probe_names[] = { "0", "1", "2", "3", "4", "5", "6", "7", - "8", "9", "10", "11", "12", "13", "14", "15", NULL, + "8", "9", "10", "11", "12", "13", "14", "15", + NULL, }; static const uint64_t supported_samplerates[] = { diff --git a/hardware/hantek-dso/api.c b/hardware/hantek-dso/api.c index a617e551..19ddd86e 100644 --- a/hardware/hantek-dso/api.c +++ b/hardware/hantek-dso/api.c @@ -53,8 +53,7 @@ static const int hwcaps[] = { }; static const char *probe_names[] = { - "CH1", - "CH2", + "CH1", "CH2", NULL, }; diff --git a/hardware/lascar-el-usb/api.c b/hardware/lascar-el-usb/api.c index 049c7b51..3ae8ba53 100644 --- a/hardware/lascar-el-usb/api.c +++ b/hardware/lascar-el-usb/api.c @@ -42,9 +42,9 @@ static const int hwcaps[] = { static const char *probe_names[] = { "P1", + NULL, }; - /* Properly close and free all devices. */ static int clear_instances(void) { diff --git a/hardware/link-mso19/link-mso19.c b/hardware/link-mso19/link-mso19.c index 6fdf51c6..40e8d9e3 100644 --- a/hardware/link-mso19/link-mso19.c +++ b/hardware/link-mso19/link-mso19.c @@ -54,14 +54,7 @@ static const int hwcaps[] = { * See also: http://www.linkinstruments.com/images/mso19_1113.gif */ static const char *probe_names[NUM_PROBES + 1] = { - "0", - "1", - "2", - "3", - "4", - "5", - "6", - "7", + "0", "1", "2", "3", "4", "5", "6", "7", NULL, }; diff --git a/hardware/nexus-osciprime/api.c b/hardware/nexus-osciprime/api.c index 8b39ddae..8624b841 100644 --- a/hardware/nexus-osciprime/api.c +++ b/hardware/nexus-osciprime/api.c @@ -92,8 +92,7 @@ static const struct sr_rational timebases[] = { }; static const char *probe_names[] = { - "CHA", - "CHB", + "CHA", "CHB", NULL, }; diff --git a/hardware/openbench-logic-sniffer/api.c b/hardware/openbench-logic-sniffer/api.c index 8bc32b39..c3e1647d 100644 --- a/hardware/openbench-logic-sniffer/api.c +++ b/hardware/openbench-logic-sniffer/api.c @@ -32,38 +32,9 @@ static const int hwcaps[] = { /* Probes are numbered 0-31 (on the PCB silkscreen). */ SR_PRIV const char *ols_probe_names[NUM_PROBES + 1] = { - "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", + "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", NULL, }; diff --git a/hardware/victor-dmm/api.c b/hardware/victor-dmm/api.c index ae0d2a76..63ae5fb7 100644 --- a/hardware/victor-dmm/api.c +++ b/hardware/victor-dmm/api.c @@ -46,6 +46,7 @@ static const int hwcaps[] = { static const char *probe_names[] = { "P1", + NULL, }; /* Properly close and free all devices. */ diff --git a/hardware/zeroplus-logic-cube/zeroplus.c b/hardware/zeroplus-logic-cube/zeroplus.c index 739e490e..6dd20701 100644 --- a/hardware/zeroplus-logic-cube/zeroplus.c +++ b/hardware/zeroplus-logic-cube/zeroplus.c @@ -85,22 +85,8 @@ static const int hwcaps[] = { * We currently ignore other untested/unsupported devices here. */ static const char *probe_names[NUM_PROBES + 1] = { - "A0", - "A1", - "A2", - "A3", - "A4", - "A5", - "A6", - "A7", - "B0", - "B1", - "B2", - "B3", - "B4", - "B5", - "B6", - "B7", + "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", + "B0", "B1", "B2", "B3", "B4", "B5", "B6", "B7", NULL, };