From 51f879cb32da7c0e76c365b429d91530f7e5b3d5 Mon Sep 17 00:00:00 2001 From: Julien BLACHE Date: Fri, 30 Jul 2010 19:05:42 +0200 Subject: [PATCH] Turn flags into bitfields to reduce struct sizes --- src/raop.c | 6 +++--- src/raop.h | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/raop.c b/src/raop.c index 7322233d..2bcc4cc9 100644 --- a/src/raop.c +++ b/src/raop.c @@ -84,9 +84,9 @@ struct raop_session struct evrtsp_connection *ctrl; enum raop_session_state state; - int req_in_flight; - int req_has_auth; - int encrypt; + unsigned req_in_flight:1; + unsigned req_has_auth:1; + unsigned encrypt:1; int cseq; char *session; diff --git a/src/raop.h b/src/raop.h index 2bca87ad..4b3d7400 100644 --- a/src/raop.h +++ b/src/raop.h @@ -28,11 +28,11 @@ struct raop_device short v4_port; short v6_port; - char selected; - char advertised; - char encrypt; + unsigned selected:1; + unsigned advertised:1; + unsigned encrypt:1; - char has_password; + unsigned has_password:1; const char *password; struct raop_session *session;