diff options
author | Richard Levitte <levitte@openssl.org> | 2016-01-14 14:07:57 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2016-01-14 14:07:57 +0100 |
commit | 1cd5cc368f9c907b2d184b4643ddcac2a156f628 (patch) | |
tree | ceae934f7d58e8dd62b66e300e6d4a8169794884 /apps/apps.c | |
parent | 9b56815d5f91180e2092d3e578054b8099100a48 (diff) | |
download | openssl-1cd5cc368f9c907b2d184b4643ddcac2a156f628.tar.gz |
Rename binmode into textmode and use it correctly
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'apps/apps.c')
-rw-r--r-- | apps/apps.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/apps.c b/apps/apps.c index 685536a434..43a51f63ae 100644 --- a/apps/apps.c +++ b/apps/apps.c @@ -2796,7 +2796,7 @@ BIO *bio_open_owner(const char *filename, int format, int private) { FILE *fp = NULL; BIO *b = NULL; - int fd = -1, bflags, mode, binmode; + int fd = -1, bflags, mode, textmode; if (!private || filename == NULL || strcmp(filename, "-") == 0) return bio_open_default(filename, 'w', format); @@ -2808,8 +2808,8 @@ BIO *bio_open_owner(const char *filename, int format, int private) #ifdef O_TRUNC mode |= O_TRUNC; #endif - binmode = istext(format); - if (binmode) { + textmode = istext(format); + if (!textmode) { #ifdef O_BINARY mode |= O_BINARY; #elif defined(_O_BINARY) @@ -2824,7 +2824,7 @@ BIO *bio_open_owner(const char *filename, int format, int private) if (fp == NULL) goto err; bflags = BIO_CLOSE; - if (!binmode) + if (textmode) bflags |= BIO_FP_TEXT; b = BIO_new_fp(fp, bflags); if (b) |