Re: [PATCH v2 2/4] tee.2: use proper types in example

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

 



On 1/3/22 18:03, наб wrote:
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@xxxxxxxxxxxxxxxxxx>
---
The difference is, realistically, negligible, but it does make the code
look like it came from the 4.3BSD era.

:-)


Comments applied. 1/4 not re-sent since you applied it.

I applied all of v2, and another one to remove an unnecessary 'else'.

Cheers,

Alex


  man2/tee.2 | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/man2/tee.2 b/man2/tee.2
index 14a927c93..9d83ee982 100644
--- a/man2/tee.2
+++ b/man2/tee.2
@@ -164,7 +164,7 @@ int
  main(int argc, char *argv[])
  {
      int fd;
-    int len, slen;
+    ssize_t len, slen;
if (argc != 2) {
          fprintf(stderr, "Usage: %s <file>\en", argv[0]);
@@ -183,7 +183,6 @@ main(int argc, char *argv[])
           */
          len = tee(STDIN_FILENO, STDOUT_FILENO,
                    INT_MAX, SPLICE_F_NONBLOCK);
-

I removed this change, since I guessed it was a rebase mistake.

          if (len < 0) {
              if (errno == EAGAIN)
                  continue;

--
Alejandro Colomar
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux