{"thread":{"id":"43391","subject":"[PATCH] git-apply: slightly clean up bitfield usage","startedAt":"2006-11-18T12:07:09Z","lastAt":"2006-11-18T12:07:09Z","messageCount":1,"participants":["Rene Scharfe"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"294599","messageId":"455EF76D.1040206@lsrfire.ath.cx","threadId":"43391","inReplyTo":null,"subject":"[PATCH] git-apply: slightly clean up bitfield usage","fromName":"Rene Scharfe","fromEmail":"rene.scharfe@lsrfire.ath.cx","sentAt":"2006-11-18T12:07:09Z","receivedAt":"2006-11-18T12:07:09Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"This patch fixes a sparse warning about inaccurate_eof being a\n\"dubious one-bit signed bitfield\", makes three more binary\nvariables members of this (now unsigned) bitfield and adds a\nshort comment to indicate the nature of two ternary variables.\n\nSigned-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>\n---\n builtin-apply.c |    7 +++++--\n 1 files changed, 5 insertions(+), 2 deletions(-)\n\ndiff --git a/builtin-apply.c b/builtin-apply.c\nindex aad5526..61f047f 100644\n--- a/builtin-apply.c\n+++ b/builtin-apply.c\n@@ -140,12 +140,15 @@ struct fragment {\n struct patch {\n \tchar *new_name, *old_name, *def_name;\n \tunsigned int old_mode, new_mode;\n-\tint is_rename, is_copy, is_new, is_delete, is_binary;\n+\tint is_new, is_delete;\t/* -1 = unknown, 0 = false, 1 = true */\n \tint rejected;\n \tunsigned long deflate_origlen;\n \tint lines_added, lines_deleted;\n \tint score;\n-\tint inaccurate_eof:1;\n+\tunsigned int inaccurate_eof:1;\n+\tunsigned int is_binary:1;\n+\tunsigned int is_copy:1;\n+\tunsigned int is_rename:1;\n \tstruct fragment *fragments;\n \tchar *result;\n \tunsigned long resultsize;\n-- \n1.4.4\n"}]}