[Spice-devel] [PATCH spice-server 14/22] reds: use true/false where bool is used

Frediano Ziglio fziglio at redhat.com
Fri Jun 16 09:13:26 UTC 2017


Do not mix mnemonics

Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 server/reds.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/server/reds.c b/server/reds.c
index fd13f20..6cb1fb8 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -950,9 +950,9 @@ static bool channel_supports_multiple_clients(RedChannel *channel)
     case SPICE_CHANNEL_DISPLAY:
     case SPICE_CHANNEL_CURSOR:
     case SPICE_CHANNEL_INPUTS:
-        return TRUE;
+        return true;
     }
-    return FALSE;
+    return false;
 }
 
 static void reds_fill_channels(RedsState *reds, SpiceMsgChannels *channels_info)
@@ -1440,7 +1440,7 @@ bool reds_handle_migrate_data(RedsState *reds, MainChannelClient *mcc,
         }
     }
 
-    return TRUE;
+    return true;
 }
 
 static void reds_channel_init_auth_caps(RedLinkInfo *link, RedChannel *channel)
@@ -1480,7 +1480,7 @@ static bool reds_send_link_ack(RedsState *reds, RedLinkInfo *link)
     const RedChannelCapabilities *channel_caps;
     BUF_MEM *bmBuf;
     BIO *bio = NULL;
-    int ret = FALSE;
+    bool ret = false;
     size_t hdr_size;
 
     SPICE_VERIFY(sizeof(msg) == sizeof(SpiceLinkHeader) + sizeof(SpiceLinkReply));
@@ -1497,7 +1497,7 @@ static bool reds_send_link_ack(RedsState *reds, RedLinkInfo *link)
     if (!channel) {
         if (link->link_mess->channel_type != SPICE_CHANNEL_MAIN) {
             spice_warning("Received wrong header: channel_type != SPICE_CHANNEL_MAIN");
-            return FALSE;
+            return false;
         }
         spice_assert(reds->main_channel);
         channel = RED_CHANNEL(reds->main_channel);
@@ -1516,12 +1516,12 @@ static bool reds_send_link_ack(RedsState *reds, RedLinkInfo *link)
         || !red_link_info_test_capability(link, SPICE_COMMON_CAP_AUTH_SASL)) {
         if (!(link->tiTicketing.rsa = RSA_new())) {
             spice_warning("RSA new failed");
-            return FALSE;
+            return false;
         }
 
         if (!(bio = BIO_new(BIO_s_mem()))) {
             spice_warning("BIO new failed");
-            return FALSE;
+            return false;
         }
 
         if (RSA_generate_key_ex(link->tiTicketing.rsa,
@@ -1565,7 +1565,7 @@ static bool reds_send_link_ack(RedsState *reds, RedLinkInfo *link)
             goto end;
     }
 
-    ret = TRUE;
+    ret = true;
 
 end:
     if (bio != NULL)
@@ -1673,10 +1673,10 @@ static bool reds_find_client(RedsState *reds, RedClient *client)
 
     GLIST_FOREACH(reds->clients, iter, RedClient, list_client) {
         if (list_client == client) {
-            return TRUE;
+            return true;
         }
     }
-    return FALSE;
+    return false;
 }
 
 /* should be used only when there is one client */
@@ -2397,15 +2397,15 @@ static RedLinkInfo *reds_init_client_connection(RedsState *reds, int socket)
 {
     RedLinkInfo *link;
 
-    if (!red_socket_set_non_blocking(socket, TRUE)) {
+    if (!red_socket_set_non_blocking(socket, true)) {
        goto error;
     }
 
-    if (!red_socket_set_no_delay(socket, TRUE)) {
+    if (!red_socket_set_no_delay(socket, true)) {
        goto error;
     }
 
-    red_socket_set_keepalive(socket, TRUE, KEEPALIVE_TIMEOUT);
+    red_socket_set_keepalive(socket, true, KEEPALIVE_TIMEOUT);
 
     link = spice_new0(RedLinkInfo, 1);
     link->reds = reds;
-- 
2.9.4



More information about the Spice-devel mailing list