提交 fcf712e6 编写于 作者: J Junio C Hamano 提交者: Linus Torvalds

[PATCH] Byteorder fix for read-tree, new -m semantics version.

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: NJunio C Hamano <junkio@cox.net>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 d99082e0
......@@ -66,7 +66,7 @@ struct cache_entry {
#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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册