X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Finput%2Fbinary.c;h=013621373c71dd4eed995c19980fed76c1b13cbc;hb=f129014ca4cc1e38749934c5089b8bcb2ab3ea35;hp=4984edb0b0aa37b9d8145cf9acda08e01ea981dd;hpb=bee2b0168c087676c1b365861d8c2d4714afa9b9;p=libsigrok.git diff --git a/src/input/binary.c b/src/input/binary.c index 4984edb0..01362137 100644 --- a/src/input/binary.c +++ b/src/input/binary.c @@ -29,9 +29,9 @@ #define LOG_PREFIX "input/binary" -#define MAX_CHUNK_SIZE 4096 -#define DEFAULT_NUM_CHANNELS 8 -#define DEFAULT_SAMPLERATE 0 +#define MAX_CHUNK_SIZE 4096 +#define DEFAULT_NUM_CHANNELS 8 +#define DEFAULT_SAMPLERATE 0 struct context { gboolean started; @@ -56,7 +56,7 @@ static int init(struct sr_input *in, GHashTable *options) inc->samplerate = g_variant_get_uint64(g_hash_table_lookup(options, "samplerate")); for (i = 0; i < num_channels; i++) { - snprintf(name, 16, "%d", i); + snprintf(name, sizeof(name), "%d", i); sr_channel_new(in->sdi, i, SR_CHANNEL_LOGIC, TRUE, name); }