[babl] Don't repeat the malloc/free function pointer change messages
- From: Mukund Sivaraman <muks src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl] Don't repeat the malloc/free function pointer change messages
- Date: Sun, 19 Apr 2015 19:31:21 +0000 (UTC)
commit 804808f4e3d1fa1c8824932637a110f985b19187
Author: Mukund Sivaraman <muks banu com>
Date: Mon Apr 20 01:00:58 2015 +0530
Don't repeat the malloc/free function pointer change messages
babl/babl-memory.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/babl/babl-memory.c b/babl/babl-memory.c
index f0291e7..d9e4d2f 100644
--- a/babl/babl-memory.c
+++ b/babl/babl-memory.c
@@ -84,16 +84,19 @@ functions_sanity (void)
if (first_malloc_used != malloc_f ||
first_free_used != free_f)
{
+ static int displayed = 0;
+
if (first_malloc_used == NULL)
{
first_malloc_used = malloc_f;
first_free_used = free_f;
}
- else
+ else if (!displayed)
{
fprintf (stderr, "HMM....\nSomething strange is happening,\n%s function pointer changing between
invocations in babl.\n",
first_malloc_used == malloc_f ? "free" :
(first_free_used == free_f ? "malloc" : "malloc and free"));
+ displayed = 1;
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]