cf_pair_replace returns -1 on error
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sun, 1 Feb 2015 13:55:11 +0000 (20:55 +0700)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sun, 1 Feb 2015 13:56:35 +0000 (20:56 +0700)
src/main/unittest.c

index 008b872..d2ae6bd 100644 (file)
@@ -470,7 +470,7 @@ static ssize_t xlat_poke(UNUSED void *instance, REQUEST *request,
                goto fail;
        }
 
-       if (!cf_pair_replace(mi->cs, cp, q)) {
+       if (cf_pair_replace(mi->cs, cp, q) < 0) {
                RDEBUG("Failed replacing pair");
                goto fail;
        }