diff options
author | Richard Levitte <levitte@openssl.org> | 2015-09-04 15:17:29 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2015-09-06 01:35:54 +0200 |
commit | afc12d76f80d6ee14df3fc655e3c7e868ae0f368 (patch) | |
tree | 64835acbf5dff50e6d647c801cf085b6f4fac84f /apps/openssl.c | |
parent | 0f81f5f78c06bd69a96deb66cd30e50a67310ef2 (diff) |
Have binary mode when the format is binary, not the other way around
Fixing a small mixup.
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'apps/openssl.c')
-rw-r--r-- | apps/openssl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/openssl.c b/apps/openssl.c index 7e340be21a..bfd77a55b4 100644 --- a/apps/openssl.c +++ b/apps/openssl.c @@ -305,11 +305,11 @@ static const char *modestr(char mode, int format) switch (mode) { case 'a': - return (format) & B_FORMAT_TEXT ? "ab" : "a"; + return (format & B_FORMAT_TEXT) ? "a" : "ab"; case 'r': - return (format) & B_FORMAT_TEXT ? "rb" : "r"; + return (format & B_FORMAT_TEXT) ? "r" : "rb"; case 'w': - return (format) & B_FORMAT_TEXT ? "wb" : "w"; + return (format & B_FORMAT_TEXT) ? "w" : "wb"; } /* The assert above should make sure we never reach this point */ return NULL; |