Skip to contentSkip to conversation

perf tools: Remove string.h from util.h

tip:perf/core tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message Apr 24, 2017 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  72f7c4d22ccf7c7e78aa80ea3285e77404b31913
Gitweb:     http://git.kernel.org/tip/72f7c4d22ccf7c7e78aa80ea3285e77404b31913
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Wed, 19 Apr 2017 19:06:30 -0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Mon, 24 Apr 2017 13:43:32 -0300

perf tools: Remove string.h from util.h

Not needed in this header, added to the places that need strdup, strcmp and a few other prototypes.

---
 tools/perf/util/comm.c       | 1 +
 tools/perf/util/namespaces.c | 1 +
 tools/perf/util/util.h       | 1 -
 tools/perf/util/xyarray.c    | 2 ++
 4 files changed, 4 insertions(+), 1 deletion(-)
tools/perf/util/comm.c +1 -0
index 530a62a..7bc981b 100644
@@ -3,6 +3,7 @@
 #include <errno.h>
 #include <stdlib.h>
 #include <stdio.h>
+#include <string.h>
 #include <linux/refcount.h>
 
 struct comm_str {
tools/perf/util/namespaces.c +1 -0
index 2de8da6..67dcbcc 100644
@@ -11,6 +11,7 @@
 #include "event.h"
 #include <stdlib.h>
 #include <stdio.h>
+#include <string.h>
 
 struct namespaces *namespaces__new(struct namespaces_event *event)
 {
tools/perf/util/util.h +0 -1
index c014b2f..b8dfbe1 100644
@@ -15,7 +15,6 @@
 #include <stddef.h>
 #include <stdlib.h>
 #include <stdarg.h>
-#include <string.h>
 #include <sys/wait.h>
 #include <poll.h>
 #include <linux/types.h>
tools/perf/util/xyarray.c +2 -0
index c10ba41..7251fdb 100644
@@ -1,5 +1,7 @@
 #include "xyarray.h"
 #include "util.h"
+#include <stdlib.h>
+#include <string.h>
 
 struct xyarray *xyarray__new(int xlen, int ylen, size_t entry_size)
 {