summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Rene Scharfe <rene.scharfe@lsrfire.ath.cx>2006-11-18 13:07:09 +0100
committerLibravatar Junio C Hamano <junkio@cox.net>2006-11-18 11:40:11 -0800
commit3dad11bfdb9363bade57ca2caadef1883767e9d3 (patch)
tree15232400ae0587f20dcc8df14f6e1af51f4102e8
parentsparse fix: Using plain integer as NULL pointer (diff)
downloadtgif-3dad11bfdb9363bade57ca2caadef1883767e9d3.tar.xz
git-apply: slightly clean up bitfield usage
This patch fixes a sparse warning about inaccurate_eof being a "dubious one-bit signed bitfield", makes three more binary variables members of this (now unsigned) bitfield and adds a short comment to indicate the nature of two ternary variables. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r--builtin-apply.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/builtin-apply.c b/builtin-apply.c
index aad55261fa..61f047fd45 100644
--- a/builtin-apply.c
+++ b/builtin-apply.c
@@ -140,12 +140,15 @@ struct fragment {
struct patch {
char *new_name, *old_name, *def_name;
unsigned int old_mode, new_mode;
- int is_rename, is_copy, is_new, is_delete, is_binary;
+ int is_new, is_delete; /* -1 = unknown, 0 = false, 1 = true */
int rejected;
unsigned long deflate_origlen;
int lines_added, lines_deleted;
int score;
- int inaccurate_eof:1;
+ unsigned int inaccurate_eof:1;
+ unsigned int is_binary:1;
+ unsigned int is_copy:1;
+ unsigned int is_rename:1;
struct fragment *fragments;
char *result;
unsigned long resultsize;