bug-coreutils
[Top][All Lists]
Advanced

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

Re: touch - a small optim


From: Jim Meyering
Subject: Re: touch - a small optim
Date: Thu, 12 Jun 2003 10:19:08 +0200

Bruno Haible <address@hidden> wrote:
> This patch removes a useless system call (close(-1)) in some cases.
>
> diff -r -c3 coreutils-5.0/src/touch.c coreutils-5.0-touch/src/touch.c
> *** coreutils-5.0/src/touch.c 2002-12-20 21:09:22.000000000 +0100
> --- coreutils-5.0-touch/src/touch.c   2003-05-25 21:39:54.000000000 +0200
> ***************
> *** 169,175 ****
>             error (0, errno, _("failed to get attributes of %s"),
>                    quote (file));
>           }
> !       close (fd);
>         return 1;
>       }
>       }
> --- 219,226 ----
>             error (0, errno, _("failed to get attributes of %s"),
>                    quote (file));
>           }
> !       if (fd != -1)
> !         close (fd);

Thank you.
I've applied that patch.

Did you feel like addressing the problem with your --inside patch?




reply via email to

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