]> sigrok.org Git - sigrok-cli.git/blobdiff - parsers.c
Various #include file cosmetic fixes.
[sigrok-cli.git] / parsers.c
index ee992712bd126fb261fea9991e9e529dba260fb0..f7d03bc6bbf230d9af2247b11ecf1fd43755e27d 100644 (file)
--- a/parsers.c
+++ b/parsers.c
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "sigrok-cli.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdint.h>
 #include <string.h>
 #include <glib.h>
+#include "sigrok-cli.h"
 
 extern struct sr_context *sr_ctx;
 
@@ -67,10 +67,12 @@ GSList *parse_channelstring(struct sr_dev_inst *sdi, const char *channelstring)
                        break;
                }
                if (strchr(tokens[i], '-')) {
-                       /* A range of channels in the form a-b. This will only work
+                       /*
+                        * A range of channels in the form a-b. This will only work
                         * if the channels are named as numbers -- so every channel
                         * in the range must exist as a channel name string in the
-                        * device. */
+                        * device.
+                        */
                        range = g_strsplit(tokens[i], "-", 2);
                        if (!range[0] || !range[1] || range[2]) {
                                /* Need exactly two arguments. */
@@ -200,7 +202,7 @@ int parse_triggerstring(const struct sr_dev_inst *sdi, const char *s,
        driver = sr_dev_inst_driver_get(sdi);
        channels = sr_dev_inst_channels_get(sdi);
 
-       if (sr_config_list(driver, sdi, NULL, SR_CONF_TRIGGER_MATCH,
+       if (maybe_config_list(driver, sdi, NULL, SR_CONF_TRIGGER_MATCH,
                        &gvar) != SR_OK) {
                g_critical("Device doesn't support any triggers.");
                return FALSE;
@@ -447,4 +449,3 @@ int parse_driver(char *arg, struct sr_dev_driver **driver, GSList **drvopts)
 
        return TRUE;
 }
-