]> sigrok.org Git - libsigrok.git/blobdiff - input/chronovu_la8.c
Use g_try_malloc/g_free/g_strdup consistently.
[libsigrok.git] / input / chronovu_la8.c
index a2aab33512e0a7984a9ec4d0e33f331f7a09d5db..e1b6ad10d93229324a9968cd2a910c8147ca3661 100644 (file)
@@ -49,21 +49,21 @@ static uint64_t divcount_to_samplerate(uint8_t divcount)
 static int format_match(const char *filename)
 {
        if (!filename) {
-               sr_warn("la8input: %s: filename was NULL", __func__);
+               sr_err("la8input: %s: filename was NULL", __func__);
                // return SR_ERR; /* FIXME */
                return FALSE;
        }
 
        if (!g_file_test(filename, G_FILE_TEST_EXISTS)) {
-               sr_warn("la8input: %s: input file '%s' does not exist",
-                       __func__, filename);
+               sr_err("la8input: %s: input file '%s' does not exist",
+                      __func__, filename);
                // return SR_ERR; /* FIXME */
                return FALSE;
        }
 
        if (!g_file_test(filename, G_FILE_TEST_IS_REGULAR)) {
-               sr_warn("la8input: %s: input file '%s' not a regular file",
-                       __func__, filename);
+               sr_err("la8input: %s: input file '%s' not a regular file",
+                      __func__, filename);
                // return SR_ERR; /* FIXME */
                return FALSE;
        }
@@ -83,7 +83,7 @@ static int init(struct sr_input *in)
        if (in->param && in->param[0]) {
                num_probes = strtoul(in->param, NULL, 10);
                if (num_probes < 1) {
-                       sr_warn("la8input: %s: strtoul failed", __func__);
+                       sr_err("la8input: %s: strtoul failed", __func__);
                        return SR_ERR;
                }
        } else {
@@ -113,7 +113,7 @@ static int loadfile(struct sr_input *in, const char *filename)
 
        /* TODO: Use glib functions! GIOChannel, g_fopen, etc. */
        if ((fd = open(filename, O_RDONLY)) == -1) {
-               sr_warn("la8input: %s: file open failed", __func__);
+               sr_err("la8input: %s: file open failed", __func__);
                return SR_ERR;
        }