git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 6/7] Change types used in bitfields to be `int's.

From
FFFlorian Forster <octo@verplant.org>
Date
Jun 18, 2006, 15:18 UTC
Message-ID
<1150643889961-git-send-email-octo@verplant.org>
In-Reply-To
<11506438893544-git-send-email-octo@verplant.org>

According to ANSI C99 bitfields are only defined for `signed int' and `unsigned int'. This patch corrects the bitfield in the `msg_data_t' type from `imap-send.c'.

Signed-off-by: Florian Forster <octo@verplant.org>
---
 imap-send.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
471838c5e32b83bc8b84584343daeb1174d0e968
diff --git a/imap-send.c b/imap-send.c
index 285ad29..94e39cd 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -93,7 +93,7 @@ typedef struct {
 	char *data;
 	int len;
 	unsigned char flags;
-	unsigned char crlf:1;
+	unsigned int crlf:1;
 } msg_data_t;
 
 #define DRV_OK          0
-- 
1.3.3
Next: Florian Forster
Message 1 of 2 in “Change types used in bitfields to be `int's.”
  1. 6/7 Change types used in bitfields to be `int's.Florian Forster, Jun 18, 2006
  2. 7/7 Remove all void-pointer arithmetic.Florian Forster, Jun 18, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.