Blame SOURCES/0008-Remove-function-malloc_readlink.patch

9d8306
From f5f7f625ff489bf0e68f4b99503188b7006807ce Mon Sep 17 00:00:00 2001
9d8306
From: Matej Habrnal <mhabrnal@redhat.com>
9d8306
Date: Fri, 13 Mar 2015 16:11:01 +0100
9d8306
Subject: [PATCH] Remove function malloc_readlink
9d8306
9d8306
The same function was added to the libreport so there was a conflict between
9d8306
them.
9d8306
9d8306
Related to #1185626
9d8306
9d8306
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
9d8306
---
9d8306
 src/abrt-checker.c | 23 -----------------------
9d8306
 1 file changed, 23 deletions(-)
9d8306
9d8306
diff --git a/src/abrt-checker.c b/src/abrt-checker.c
9d8306
index 56f2fa4..4e1a450 100644
9d8306
--- a/src/abrt-checker.c
9d8306
+++ b/src/abrt-checker.c
9d8306
@@ -1039,29 +1039,6 @@ static void get_thread_name(
9d8306
 }
9d8306
 
9d8306
 
9d8306
-/*
9d8306
- * Read executable name from link /proc/${PID}/exe
9d8306
- */
9d8306
-static char* malloc_readlink(const char *linkname)
9d8306
-{
9d8306
-    char buf[PATH_MAX + 1];
9d8306
-    int len;
9d8306
-
9d8306
-    len = readlink(linkname, buf, sizeof(buf)-1);
9d8306
-    if (len >= 0)
9d8306
-    {
9d8306
-        buf[len] = '\0';
9d8306
-        char *p = malloc(strlen(buf) + 1);
9d8306
-        if (p)
9d8306
-        {
9d8306
-            strcpy(p, buf);
9d8306
-        }
9d8306
-        return p;
9d8306
-    }
9d8306
-    return NULL;
9d8306
-}
9d8306
-
9d8306
-
9d8306
 
9d8306
 /*
9d8306
  * Read executable name from the special file /proc/${PID}/exe
9d8306
-- 
9d8306
2.4.6
9d8306