[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#18006: Simplify via set_binary_mode

From: Paul Eggert
Subject: bug#18006: Simplify via set_binary_mode
Date: Sun, 13 Jul 2014 19:11:54 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

Eli Zaretskii wrote:
+  return isatty (fd) - 1;
Do we need this "-1" part now?  It could misfire if isatty does
return 1 some day.

Sorry, I don't so how it can misfire. isatty returns 1 on success, 0 on failure; whereas the caller returns 0 on success, -1 on failure. So subtracting 1 is the right thing to do, no?

A revised patch, taking your other comments into account, is attached. It's relative to trunk bzr 117527.

Attachment: binary-io.patch
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]