From afbc7a60f17ed708f949fdb36e77d148f92ac0f1 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Mon, 21 May 2012 08:52:17 -0400 Subject: Magic-number elimination. --- lcdgps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lcdgps.c') diff --git a/lcdgps.c b/lcdgps.c index 4a768055..38000392 100644 --- a/lcdgps.c +++ b/lcdgps.c @@ -149,7 +149,7 @@ int send_lcd(char *buf) { /* TODO: check return status */ /* read the data */ - res=sockreadline(sd,rcvbuf,255); + res=sockreadline(sd,rcvbuf,sizeof(rcvbuf)-1); /* null-terminate the string before printing */ /* rcvbuf[res-1]=0; FIX-ME: not using this at the moment... */ -- cgit v1.2.1