]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Interworking: Remove unnecessary dead increment
authorJouni Malinen <j@w1.fi>
Sun, 29 Jun 2014 22:08:49 +0000 (01:08 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 2 Jul 2014 09:38:48 +0000 (12:38 +0300)
build_root_nai() will not be extended to write something after the
domain, so there is no need to update the pos pointer after the final
os_snprintf() call in the function. Remove this to make a static
analyzer happier.

Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/interworking.c

index bbee951bb38631eb70cd0a7d8f908ace096b1506..45a8f69c0de6c1c5a1c5e7cd618ee740e10760c7 100644 (file)
@@ -796,8 +796,8 @@ static int build_root_nai(char *nai, size_t nai_len, const char *imsi,
                *pos++ = imsi[4];
                *pos++ = imsi[5];
        }
-       pos += os_snprintf(pos, end - pos, ".mcc%c%c%c.3gppnetwork.org",
-                          imsi[0], imsi[1], imsi[2]);
+       os_snprintf(pos, end - pos, ".mcc%c%c%c.3gppnetwork.org",
+                   imsi[0], imsi[1], imsi[2]);
 
        return 0;
 }