summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d99082e)
raw | patch | inline | side by side (parent: d99082e)
author | Junio C Hamano <junkio@cox.net> | |
Sat, 16 Apr 2005 15:30:20 +0000 (08:30 -0700) | ||
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Sat, 16 Apr 2005 15:30:20 +0000 (08:30 -0700) |
The ce_namelen field has been renamed to ce_flags and split into
the top 2-bit unused, next 2-bit stage number and the lowest
12-bit name-length, stored in the network byte order. A new
macro create_ce_flags() is defined to synthesize this value from
length and stage, but it forgets to turn the value into the
network byte order. Here is a fix.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
the top 2-bit unused, next 2-bit stage number and the lowest
12-bit name-length, stored in the network byte order. A new
macro create_ce_flags() is defined to synthesize this value from
length and stage, but it forgets to turn the value into the
network byte order. Here is a fix.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
cache.h | patch | blob | history |
index cc8f686b66502e8b741deaa70cd08a7a34437979..b48884225df02bd6343f889d46e9193d1514659c 100644 (file)
--- a/cache.h
+++ b/cache.h
#define CE_NAMEMASK (0x0fff)
#define CE_STAGEMASK (0x3000)
-#define create_ce_flags(len, stage) ((len) | ((stage) << 12))
+#define create_ce_flags(len, stage) htons((len) | ((stage) << 12))
const char *sha1_file_directory;
struct cache_entry **active_cache;