summaryrefslogtreecommitdiff
path: root/iwinfo_cli.c
diff options
context:
space:
mode:
authorAndre Heider <a.heider@gmail.com>2022-11-18 12:29:44 +0100
committerJo-Philipp Wich <jo@mein.io>2022-12-15 20:07:49 +0100
commitccaabb4ea4b11382bffd9fb05558c390c1eb70c4 (patch)
tree78f04bfab533b1e6915b68bc2a29100a85e51000 /iwinfo_cli.c
parent50380db79b8bc3d57c43354d20626e4040dd589d (diff)
downloadiwinfo-ccaabb4ea4b11382bffd9fb05558c390c1eb70c4.tar.gz
fix -Wformat-truncation warnings
Increase buffer sizes to get rid of e.g.: iwinfo_nl80211.c:797:41: note: 'snprintf' output between 24 and 279 bytes into a destination of size 64 Signed-off-by: Andre Heider <a.heider@gmail.com>
Diffstat (limited to 'iwinfo_cli.c')
-rw-r--r--iwinfo_cli.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/iwinfo_cli.c b/iwinfo_cli.c
index dca86cf..1ca8999 100644
--- a/iwinfo_cli.c
+++ b/iwinfo_cli.c
@@ -46,7 +46,7 @@ static char * format_ssid(char *ssid)
static char * format_channel(int ch)
{
- static char buf[8];
+ static char buf[16];
if (ch <= 0)
snprintf(buf, sizeof(buf), "unknown");
@@ -70,7 +70,7 @@ static char * format_frequency(int freq)
static char * format_txpower(int pwr)
{
- static char buf[10];
+ static char buf[16];
if (pwr < 0)
snprintf(buf, sizeof(buf), "unknown");
@@ -82,7 +82,7 @@ static char * format_txpower(int pwr)
static char * format_quality(int qual)
{
- static char buf[8];
+ static char buf[16];
if (qual < 0)
snprintf(buf, sizeof(buf), "unknown");
@@ -94,7 +94,7 @@ static char * format_quality(int qual)
static char * format_quality_max(int qmax)
{
- static char buf[8];
+ static char buf[16];
if (qmax < 0)
snprintf(buf, sizeof(buf), "unknown");