Minor constification.
authorBen Laurie <ben@openssl.org>
Sun, 24 Jan 1999 17:54:23 +0000 (17:54 +0000)
committerBen Laurie <ben@openssl.org>
Sun, 24 Jan 1999 17:54:23 +0000 (17:54 +0000)
crypto/rand/rand.h
crypto/rand/randfile.c

index f5edcb9a547a80a873c913307ee2dd7da33b0956..34ef90373e70d1da312af114b70e73034a64ce31 100644 (file)
@@ -83,8 +83,8 @@ RAND_METHOD *RAND_SSLeay(void);
 void RAND_cleanup(void );
 void RAND_bytes( unsigned char *buf,int num);
 void RAND_seed( unsigned char *buf,int num);
 void RAND_cleanup(void );
 void RAND_bytes( unsigned char *buf,int num);
 void RAND_seed( unsigned char *buf,int num);
-int  RAND_load_file(char *file,long max_bytes);
-int  RAND_write_file(char *file);
+int  RAND_load_file(const char *file,long max_bytes);
+int  RAND_write_file(const char *file);
 char *RAND_file_name(char *file,int num);
 #ifdef WINDOWS
 void RAND_screen(void);
 char *RAND_file_name(char *file,int num);
 #ifdef WINDOWS
 void RAND_screen(void);
index 4b38b2bf64c08f26fa57aaf1ccd8ad91c0127c09..de7567bc461fd8cb8e63c87341360a1c9ea005cf 100644 (file)
@@ -70,7 +70,7 @@
 /* #define RFILE ".rand" - defined in ../../e_os.h */
 
 int RAND_load_file(file,bytes)
 /* #define RFILE ".rand" - defined in ../../e_os.h */
 
 int RAND_load_file(file,bytes)
-char *file;
+const char *file;
 long bytes;
        {
        MS_STATIC unsigned char buf[BUFSIZE];
 long bytes;
        {
        MS_STATIC unsigned char buf[BUFSIZE];
@@ -87,7 +87,7 @@ long bytes;
        if (i < 0) return(0);
        if (bytes <= 0) return(ret);
 
        if (i < 0) return(0);
        if (bytes <= 0) return(ret);
 
-       in=fopen(file,"br");
+       in=fopen(file,"rb");
        if (in == NULL) goto err;
        for (;;)
                {
        if (in == NULL) goto err;
        for (;;)
                {
@@ -107,7 +107,7 @@ err:
        }
 
 int RAND_write_file(file)
        }
 
 int RAND_write_file(file)
-char *file;
+const char *file;
        {
        unsigned char buf[BUFSIZE];
        int i,ret=0;
        {
        unsigned char buf[BUFSIZE];
        int i,ret=0;