Wrap code starting with a definition.
authorRichard Levitte <levitte@openssl.org>
Thu, 25 Mar 2004 20:01:03 +0000 (20:01 +0000)
committerRichard Levitte <levitte@openssl.org>
Thu, 25 Mar 2004 20:01:03 +0000 (20:01 +0000)
PR: 854

crypto/rand/randfile.c

index f64c7383b2b60441b9dc7d4a8c0d556b1dc1356a..767d2c70d62447ead049efbfa859b0a6368463aa 100644 (file)
@@ -138,6 +138,7 @@ int RAND_write_file(const char *file)
        int n;
        
 #if defined(O_CREAT) && !defined(WIN32)
+       {
        /* For some reason Win32 can't write to files created this way */
        
        /* chmod(..., 0600) is too late to protect the file,
@@ -145,6 +146,7 @@ int RAND_write_file(const char *file)
        int fd = open(file, O_CREAT, 0600);
        if (fd != -1)
                out = fdopen(fd, "wb");
+       }
 #endif
        if (out == NULL)
                out = fopen(file,"wb");