table plugin: fix truncation warnings
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Tue, 15 May 2018 20:03:00 +0000 (22:03 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Tue, 15 May 2018 20:03:51 +0000 (22:03 +0200)
commita97658980166d9b19b6dda048a7969e163daf58b
treea129550c8049fa9f605fe41ead85d7bba822e77b
parent1edb3b9f2c98067d26a0ec47246650a09a026b23
table plugin: fix truncation warnings

  CC       src/table.lo
src/table.c: In function ‘tbl_read_table’:
src/table.c:396:66: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=]
       snprintf(vl.type_instance, sizeof(vl.type_instance), "%s-%s",
                                                                  ^
src/table.c:396:7: note: ‘snprintf’ output 2 or more bytes (assuming 129) into a destination of size 128
       snprintf(vl.type_instance, sizeof(vl.type_instance), "%s-%s",
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                res->instance_prefix, instances_str);
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/table.c