git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* duplicate htons() in check_file_directory_conflict()
@ 2005-06-06 23:02 Timo Hirvonen
  2005-06-07  1:59 ` Linus Torvalds
  0 siblings, 1 reply; 3+ messages in thread
From: Timo Hirvonen @ 2005-06-06 23:02 UTC (permalink / raw)
  To: git

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/



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-06-07 20:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-06 23:02 duplicate htons() in check_file_directory_conflict() Timo Hirvonen
2005-06-07  1:59 ` Linus Torvalds
2005-06-07 20:35   ` [PATCH] Use ntohs instead of htons to convert ce_flags to host byte order Timo Hirvonen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).