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

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