]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Fix more null string checks
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 2 Jan 2013 12:31:59 +0000 (12:31 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 2 Jan 2013 12:31:59 +0000 (12:31 +0000)
src/modules/rlm_rest/rest.c

index f886202c83b11ed04e842187963e1f6aee3d9412..83f2165249c1047bd86b30973ae342ec9dcb4fd3 100644 (file)
@@ -1006,8 +1006,7 @@ static int rest_decode_post(rlm_rest_t *instance,
         * Empty response?
         */
        while (isspace(*p)) p++;
-
-       if (p == NULL) return FALSE;
+       if (*p == '\0') return FALSE;
 
        while (((q = strchr(p, '=')) != NULL) &&
               (count < REST_BODY_MAX_ATTRS)) {
@@ -1511,7 +1510,7 @@ static int rest_decode_json(rlm_rest_t *instance,
         *      Empty response?
         */
        while (isspace(*p)) p++;
-       if (p == '\0') return FALSE;
+       if (*p == '\0') return FALSE;
 
        json = json_tokener_parse(p);
        if (!json) {