diff options
author | Zbigniew Chyla <zbigniew.chyla@nsn.com> | 2015-01-07 11:04:00 +0100 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2015-01-13 07:23:15 -0500 |
commit | 18d76d6bda59a9eb0a3f062fac91f481babcbdf4 (patch) | |
tree | bedf2bc28676681e73a8decc42c4c757faa47e2e /monitor_italk.c | |
parent | 679ad1b39528615dbaeb22bc741b93dc3c3ee4fb (diff) | |
download | gpsd-18d76d6bda59a9eb0a3f062fac91f481babcbdf4.tar.gz |
Always use sizeof to get array size
Don't use constant/expression from an array's definition when referring
to its size. Eliminates redundancy and avoids problems when array size
changes. The change doesn't affect generated code.
Diffstat (limited to 'monitor_italk.c')
-rw-r--r-- | monitor_italk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/monitor_italk.c b/monitor_italk.c index 1f62b54b..946d706d 100644 --- a/monitor_italk.c +++ b/monitor_italk.c @@ -169,7 +169,7 @@ static void display_itk_navfix(unsigned char *buf, size_t len) for (i = 0; i < 32; i++) { if (svlist & (1 << i)) { (void)snprintf(prn, 4, "%u ", i + 1); - (void)strlcat(satlist, prn, 38); + (void)strlcat(satlist, prn, sizeof(satlist)); } } (void)wprintw(navfixwin, "%02d = %-38s", nsv, satlist); |