]> pd.if.org Git - pdclib/blobdiff - functions/string/strdup.c
Type mismatches give compiler warnings. Fixed.
[pdclib] / functions / string / strdup.c
index 6ed0f832feef21b29ec9871c622c6661c75a7b4b..d8792f30b72a98af858720b3c9a7c93a89630226 100644 (file)
@@ -32,13 +32,13 @@ int main( void )
     const char *teststr2 = "An alternative test string with non-7-bit characters \xFE\x8C\n";\r
     char *testres, *testres2;\r
 \r
-    TESTCASE(testres  = strdup(teststr));\r
-    TESTCASE(testres2 = strdup(teststr2));\r
+    TESTCASE((testres  = strdup(teststr)) != NULL);\r
+    TESTCASE((testres2 = strdup(teststr2)) != NULL);\r
     TESTCASE(strcmp(testres, teststr) == 0);\r
     TESTCASE(strcmp(testres2, teststr2) == 0);\r
     free(testres);\r
     free(testres2);\r
-    \r
+\r
     return TEST_RESULTS;\r
 }\r
 \r