]> sigrok.org Git - libsigrok.git/commitdiff
Shorten probe_names[] arrays everywhere.
authorUwe Hermann <redacted>
Tue, 25 Dec 2012 23:12:52 +0000 (00:12 +0100)
committerUwe Hermann <redacted>
Tue, 25 Dec 2012 23:16:07 +0000 (00:16 +0100)
Also, NULL-terminate all of them.

12 files changed:
hardware/alsa/api.c
hardware/asix-sigma/asix-sigma.c
hardware/chronovu-la8/protocol.c
hardware/demo/demo.c
hardware/fx2lafw/fx2lafw.c
hardware/hantek-dso/api.c
hardware/lascar-el-usb/api.c
hardware/link-mso19/link-mso19.c
hardware/nexus-osciprime/api.c
hardware/openbench-logic-sniffer/api.c
hardware/victor-dmm/api.c
hardware/zeroplus-logic-cube/zeroplus.c

index 77025c1344bdbba444f88ddc3406b2c3f01e1176..a73bfefaec6fc488b2e3e52b37e9b26a6aba7b5f 100644 (file)
@@ -41,8 +41,7 @@ static const int hwcaps[] = {
 };
 
 static const char *probe_names[] = {
-       "Channel 0",
-       "Channel 1",
+       "Channel 0", "Channel 1",
        NULL,
 };
 
index b4a9ebd463db666267e055182d8d872f32692cd2..27a91226a9c431e8765391a6918c43d473da62cb 100644 (file)
@@ -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,
 };
 
index 9b25cd7f2aca7cda43998ead73e37cde42b78ba4..5eb781e1dfdacde8648116d36d2cdd9875f3b320 100644 (file)
 
 /* 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,
 };
 
index aac585a2f3212311372ab617d8bd0dc409a3a194..7238d84e04e6518a402a929fd43993a80c181afe 100644 (file)
@@ -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,
 };
 
index a9bc899e1e88a9277abf0c05f34eeaed873b1e48..da72399c2230786d99a89ee68733da0846e9cba4 100644 (file)
@@ -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[] = {
index a617e55187dba06328fd98d60026bec93974d6cd..19ddd86e40a4d0f9df746892d9c2324aef31fb1a 100644 (file)
@@ -53,8 +53,7 @@ static const int hwcaps[] = {
 };
 
 static const char *probe_names[] = {
-       "CH1",
-       "CH2",
+       "CH1", "CH2",
        NULL,
 };
 
index 049c7b519e35286ea0505252b39577882279c839..3ae8ba5315523236692563caabb72a31aea639a9 100644 (file)
@@ -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)
 {
index 6fdf51c6032ba3781946cb88f93c00b01c4005bc..40e8d9e3ed802456cce81902494cb8be7465ee63 100644 (file)
@@ -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,
 };
 
index 8b39ddaebf200be0a8a00ea0e49c178dd0042528..8624b841b987a32baf87e2f229658970b23315bd 100644 (file)
@@ -92,8 +92,7 @@ static const struct sr_rational timebases[] = {
 };
 
 static const char *probe_names[] = {
-       "CHA",
-       "CHB",
+       "CHA", "CHB",
        NULL,
 };
 
index 8bc32b3900a50ff2d7ae20e77ffdc9569efd05e3..c3e1647d3bbb1cf352d3f2945aa2b03b4c213b4f 100644 (file)
@@ -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,
 };
 
index ae0d2a76723c177d6a56e55675af27a110eb70b0..63ae5fb7365c6577098033e87ba7714bc155c75c 100644 (file)
@@ -46,6 +46,7 @@ static const int hwcaps[] = {
 
 static const char *probe_names[] = {
        "P1",
+       NULL,
 };
 
 /* Properly close and free all devices. */
index 739e490edc23fc9dbb2582aa83bb7e9f5662413f..6dd20701885012370baa4fdbe5bc7ac6399b482f 100644 (file)
@@ -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,
 };