提交 afc12d76 编写于 作者: R Richard Levitte

Have binary mode when the format is binary, not the other way around

Fixing a small mixup.
Reviewed-by: NTim Hudson <tjh@openssl.org>
上级 0f81f5f7
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册