]> git.saurik.com Git - apple/dyld.git/blobdiff - unit-tests/test-cases/insert-libraries-with-suid/main.c
dyld-45.3.tar.gz
[apple/dyld.git] / unit-tests / test-cases / insert-libraries-with-suid / main.c
index 0571cd9621037d32b5bfcd675c8d4818967e0e7d..c9d015ccec9f194ee84a1355a357bdc65080d3bb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2005-2006 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
@@ -34,9 +34,7 @@
 int main(int argc, const char *argv[])
 {
        const char* rhs = getenv("DYLD_INSERT_LIBRARIES");
-       if ( rhs == NULL )
-        FAIL("insert-libraries-with-suid DYLD_INSERT_LIBRARIES not set");
-       else if ( rhs[0] != '\0' )
+       if ( (rhs != NULL) && (rhs[0] != '\0') )
         FAIL("insert-libraries-with-suid DYLD_INSERT_LIBRARIES not cleared");
        else
                PASS("insert-libraries-with-suid");