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

duplicate htons() in check_file_directory_conflict()

From
THTimo Hirvonen <tihirvon@ee.oulu.fi>
Date
Jun 6, 2005, 23:02 UTC
Message-ID
<1118098966l.5384l.0l@garlic>
Hi,

create_ce_flags() macro calls htons() so the htons()s in check_file_directory_conflict() should be removed or alternatively htons should be removed from the create_ce_flags macro. I noticed the bug when compiling cogito with -Wshadow.

read-cache.c:208
        pos = cache_name_pos(pathbuf,
                             htons(create_ce_flags(len, stage)));
read-cache.c:232
        pos = cache_name_pos(path,
                             htons(create_ce_flags(namelen, stage)));
-- 
http://onion.dynserv.net/~timo/
Next: Linus Torvalds
Message 1 of 3 in “duplicate htons() in check_file_directory_conflict()”
  1. Timo HirvonenJun 6, 2005
  2. Linus TorvaldsJun 7, 2005
  3. Use ntohs instead of htons to convert ce_flags to host byte orderTimo Hirvonen, Jun 7, 2005

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.