Have binary mode when the format is binary, not the other way around
Fixing a small mixup. Reviewed-by: Tim Hudson <tjh@openssl.org>
This commit is contained in:
parent
0f81f5f78c
commit
afc12d76f8
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user