[Spice-devel] [PATCH spice-server] log: Do not print function name twice during logging

Frediano Ziglio fziglio at redhat.com
Fri Jun 16 16:37:00 UTC 2017


spice_error/spice_warning already print location information
so don't print them twice.

Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 server/red-record-qxl.c | 6 +++---
 server/red-replay-qxl.c | 2 +-
 server/reds.c           | 3 +--
 3 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/server/red-record-qxl.c b/server/red-record-qxl.c
index f65b0bf..400d67c 100644
--- a/server/red-record-qxl.c
+++ b/server/red-record-qxl.c
@@ -316,7 +316,7 @@ static void red_record_image(FILE *fd, RedMemSlotInfo *slots, int group_id,
         spice_assert(size == qxl->quic.data_size);
         break;
     default:
-        spice_error("%s: unknown type %d", __FUNCTION__, qxl->descriptor.type);
+        spice_error("unknown type %d", qxl->descriptor.type);
     }
 }
 
@@ -595,7 +595,7 @@ static void red_record_native_drawable(FILE *fd, RedMemSlotInfo *slots, int grou
         red_record_composite_ptr(fd, slots, group_id, &qxl->u.composite, flags);
         break;
     default:
-        spice_error("%s: unknown type %d", __FUNCTION__, qxl->type);
+        spice_error("unknown type %d", qxl->type);
         break;
     };
 }
@@ -663,7 +663,7 @@ static void red_record_compat_drawable(FILE *fd, RedMemSlotInfo *slots, int grou
         red_record_whiteness_ptr(fd, slots, group_id, &qxl->u.whiteness, flags);
         break;
     default:
-        spice_error("%s: unknown type %d", __FUNCTION__, qxl->type);
+        spice_error("unknown type %d", qxl->type);
         break;
     };
 }
diff --git a/server/red-replay-qxl.c b/server/red-replay-qxl.c
index 6915f00..3c0f528 100644
--- a/server/red-replay-qxl.c
+++ b/server/red-replay-qxl.c
@@ -1063,7 +1063,7 @@ static QXLCompatDrawable *red_replay_compat_drawable(SpiceReplay *replay, uint32
         red_replay_whiteness_ptr(replay, &qxl->u.whiteness, flags);
         break;
     default:
-        spice_error("%s: unknown type %d", __FUNCTION__, qxl->type);
+        spice_error("unknown type %d", qxl->type);
         break;
     };
     return qxl;
diff --git a/server/reds.c b/server/reds.c
index a569a6e..4aeac9a 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -2592,8 +2592,7 @@ static int reds_init_socket(const char *addr, int portnr, int family)
         }
         close(slisten);
     }
-    spice_warning("%s: binding socket to %s:%d failed", __FUNCTION__,
-                  addr, portnr);
+    spice_warning("binding socket to %s:%d failed", addr, portnr);
     freeaddrinfo(res);
     return -1;
 
-- 
2.9.4



More information about the Spice-devel mailing list