Bug 2611 - bug/typo in stdio-common/renameat.c
Summary: bug/typo in stdio-common/renameat.c
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Ulrich Drepper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-27 07:32 UTC by Petr.Salinger
Modified: 2019-04-10 08:46 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr.Salinger 2006-04-27 07:32:39 UTC
Hi,

there is a typo in stdio-common/renameat.c,
"&&" should be used instead of "&".

Petr


--- stdio-common/renameat.c~     2006-04-27 10:19:47.000000000 +0200
+++ stdio-common/renameat.c      2006-04-27 10:19:47.000000000 +0200
@@ -29,7 +29,7 @@
      int newfd;
      const char *new;
 {
-  if ((oldfd < 0 & oldfd != AT_FDCWD) || (newfd < 0 && newfd != AT_FDCWD))
+  if ((oldfd < 0 && oldfd != AT_FDCWD) || (newfd < 0 && newfd != AT_FDCWD))
     {
       __set_errno (EBADF);
       return -1;
Comment 1 Ulrich Drepper 2006-04-27 14:31:05 UTC
The file is not used at all but should nevertheless be correct.  Applied.
Comment 2 Thomas Schwinge 2006-04-27 21:50:26 UTC
Subject: Re:  bug/typo in stdio-common/renameat.c

On Thu, Apr 27, 2006 at 02:31:05PM -0000, drepper at redhat dot com wrote:
> > [stdio-common/renameat.c]
>
> The file is not used at all but should nevertheless be correct.  Applied.

Eh?  Sure that file is being used.  Nevertheless, thanks for fixing this.