Fix warning when building on 32-bit OSX
authorJoseph C. Lehner <joseph.c.lehner@gmail.com>
Mon, 8 Feb 2016 15:05:53 +0000 (16:05 +0100)
committerJoseph C. Lehner <joseph.c.lehner@gmail.com>
Mon, 8 Feb 2016 15:05:53 +0000 (16:05 +0100)
tftp.c

diff --git a/tftp.c b/tftp.c
index ae5b1a2a8d78c38dfb7a9d9f7ff37e184ebd8a69..c24f8cc953e192850a899fe1af382657019d1093 100644 (file)
--- a/tftp.c
+++ b/tftp.c
@@ -60,8 +60,10 @@ static const char *leafname(const char *path)
 
 static bool is_netascii(const char *str)
 {
-       for (; *str; ++str) {
-               if (*str < 0x20 || *str > 0x7f) {
+       uint8_t *p = (uint8_t*)str;
+
+       for (; *p; ++p) {
+               if (*p < 0x20 || *p > 0x7f) {
                        return false;
                }
        }