Re: duplicate htons() in check_file_directory_conflict()
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- Jun 7, 2005, 01:59 UTC
- Message-ID
- <Pine.LNX.4.58.0506061858140.1876@ppc970.osdl.org>
- In-Reply-To
- <1118098966l.5384l.0l@garlic>
On Mon, 6 Jun 2005, Timo Hirvonen wrote:
Show 5 quoted lines
> > 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.
No, but it probably should be a ntohs()..
cache_name_pos() takes a host-order thing, and create_ce_flags creates a network order thing. It so happens that on all sane setups, ntohs == htons, so..
Linus