From b5682742ef212b62c9494a2d462654a7d0301266 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Tue, 23 Jan 2007 12:17:04 +0000 Subject: Fix pile of warnings about differing signedness. One of them looks like a real buglet for some architectures. --- axutils.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'axutils.c') diff --git a/axutils.c b/axutils.c index b69a910..0e8f806 100644 --- a/axutils.c +++ b/axutils.c @@ -284,11 +284,14 @@ int rose_cmp(const rose_address *a, const rose_address *b) */ int ax25_validate(const char *call) { - unsigned char s[7]; + unsigned char c; + char s[7]; int n; - for (n = 0; n < 6; n++) - s[n] = (call[n] >> 1) & 0x7F; + for (n = 0; n < 6; n++) { + c = call[n]; + s[n] = (c >> 1) & 0x7F; + } s[6] = '\0'; if (strspn(s, "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ ") == 6) -- cgit v1.2.3