diff options
Diffstat (limited to 'src/lib/libcrypto/bio/bss_file.c')
-rw-r--r-- | src/lib/libcrypto/bio/bss_file.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/bio/bss_file.c b/src/lib/libcrypto/bio/bss_file.c index 4a4e747bc7..638572ab7f 100644 --- a/src/lib/libcrypto/bio/bss_file.c +++ b/src/lib/libcrypto/bio/bss_file.c | |||
@@ -166,7 +166,7 @@ BIO *BIO_new_file(const char *filename, const char *mode) | |||
166 | #endif | 166 | #endif |
167 | if (file == NULL) | 167 | if (file == NULL) |
168 | { | 168 | { |
169 | SYSerr(SYS_F_FOPEN,get_last_sys_error()); | 169 | SYSerr(SYS_F_FOPEN, errno); |
170 | ERR_add_error_data(5,"fopen('",filename,"','",mode,"')"); | 170 | ERR_add_error_data(5,"fopen('",filename,"','",mode,"')"); |
171 | if (errno == ENOENT) | 171 | if (errno == ENOENT) |
172 | BIOerr(BIO_F_BIO_NEW_FILE,BIO_R_NO_SUCH_FILE); | 172 | BIOerr(BIO_F_BIO_NEW_FILE,BIO_R_NO_SUCH_FILE); |
@@ -242,7 +242,7 @@ static int file_read(BIO *b, char *out, int outl) | |||
242 | ret=fread(out,1,(int)outl,(FILE *)b->ptr); | 242 | ret=fread(out,1,(int)outl,(FILE *)b->ptr); |
243 | if(ret == 0 && (b->flags&BIO_FLAGS_UPLINK)?UP_ferror((FILE *)b->ptr):ferror((FILE *)b->ptr)) | 243 | if(ret == 0 && (b->flags&BIO_FLAGS_UPLINK)?UP_ferror((FILE *)b->ptr):ferror((FILE *)b->ptr)) |
244 | { | 244 | { |
245 | SYSerr(SYS_F_FREAD,get_last_sys_error()); | 245 | SYSerr(SYS_F_FREAD, errno); |
246 | BIOerr(BIO_F_FILE_READ,ERR_R_SYS_LIB); | 246 | BIOerr(BIO_F_FILE_READ,ERR_R_SYS_LIB); |
247 | ret=-1; | 247 | ret=-1; |
248 | } | 248 | } |
@@ -395,7 +395,7 @@ static long file_ctrl(BIO *b, int cmd, long num, void *ptr) | |||
395 | fp=fopen(ptr,p); | 395 | fp=fopen(ptr,p); |
396 | if (fp == NULL) | 396 | if (fp == NULL) |
397 | { | 397 | { |
398 | SYSerr(SYS_F_FOPEN,get_last_sys_error()); | 398 | SYSerr(SYS_F_FOPEN, errno); |
399 | ERR_add_error_data(5,"fopen('",ptr,"','",p,"')"); | 399 | ERR_add_error_data(5,"fopen('",ptr,"','",p,"')"); |
400 | BIOerr(BIO_F_FILE_CTRL,ERR_R_SYS_LIB); | 400 | BIOerr(BIO_F_FILE_CTRL,ERR_R_SYS_LIB); |
401 | ret=0; | 401 | ret=0; |