git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] remove unnecessary loop

From
JHJan Hudec <bulb@ucw.cz>
Date
May 8, 2007, 09:39 UTC
Message-ID
<20070508093902.GB9007@efreet.light.src>
In-Reply-To
<4640015F.1080407@gmail.com>
On Tue, May 08, 2007 at 12:49:35 +0800, Liu Yubao wrote:
Show 13 quoted lines
> +#ifdef __CYGWIN__
> +		/*
> +		 * On cygwin, lstat("hello", &st) returns 0 when
> +		 * "hello.exe" exists, so test with open() again.
> +		 */
> +		if (lstat(match, &st) && -1 != (fd = open(match, O_RDONLY))) {
> +			struct dir_entry *ent;
> +			close(fd);
> +#else
>  		if (!lstat(match, &st)) {
>  			struct dir_entry *ent;
> -
> +#endif
You seem to have reversed the sense of the test.
-- 
						 Jan 'Bulb' Hudec <bulb@ucw.cz>
Previous: Eric BlakeNext: Liu Yubao
Message 8 of 9 in “remove unnecessary loop”
  1. remove unnecessary loopLiu Yubao, May 8, 2007
  2. Liu YubaoMay 8, 2007
  3. Junio C HamanoMay 8, 2007
  4. Alex RiesenMay 8, 2007
  5. Jan HudecMay 8, 2007
  6. Alex RiesenMay 8, 2007
  7. Eric BlakeMay 8, 2007
  8. Jan HudecMay 8, 2007
  9. Liu YubaoMay 9, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.