]> sigrok.org Git - libsigrok.git/blobdiff - src/output/ascii.c
output/srzip: Prevent memory leak in case filename is empty
[libsigrok.git] / src / output / ascii.c
index 9f69d0076040ba7269745984c1bf5e6caed6322e..d2ad3acae449d45461e83bf680b2e873b365d6e2 100644 (file)
@@ -235,7 +235,7 @@ static int cleanup(struct sr_output *o)
 
 static struct sr_option options[] = {
        { "width", "Width", "Number of samples per line", NULL, NULL },
-       { 0 }
+       ALL_ZERO
 };
 
 static const struct sr_option *get_options(void)
@@ -252,10 +252,9 @@ SR_PRIV struct sr_output_module output_ascii = {
        .id = "ascii",
        .name = "ASCII",
        .desc = "ASCII art",
+       .exts = (const char*[]){"txt", NULL},
        .options = get_options,
        .init = init,
        .receive = receive,
        .cleanup = cleanup,
 };
-
-