aboutsummaryrefslogtreecommitdiffstats
path: root/src/libtracelog/libtracelog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libtracelog/libtracelog.c')
-rw-r--r--src/libtracelog/libtracelog.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/libtracelog/libtracelog.c b/src/libtracelog/libtracelog.c
index 5ce41aca0..0f8d5a00d 100644
--- a/src/libtracelog/libtracelog.c
+++ b/src/libtracelog/libtracelog.c
@@ -64,9 +64,6 @@ static inline uint32_t hash(const char *str) {
64} 64}
65 65
66static void storage_add(const char *str) { 66static void storage_add(const char *str) {
67#ifdef DEBUG
68 printf("add %s\n", str);
69#endif
70 if (!str) { 67 if (!str) {
71#ifdef DEBUG 68#ifdef DEBUG
72 printf("null pointer passed to storage_add\n"); 69 printf("null pointer passed to storage_add\n");
@@ -74,6 +71,10 @@ static void storage_add(const char *str) {
74 return; 71 return;
75 } 72 }
76 73
74#ifdef DEBUG
75 printf("add %s\n", str);
76#endif
77
77 ListElem *ptr = malloc(sizeof(ListElem)); 78 ListElem *ptr = malloc(sizeof(ListElem));
78 if (!ptr) { 79 if (!ptr) {
79 fprintf(stderr, "Error: cannot allocate memory\n"); 80 fprintf(stderr, "Error: cannot allocate memory\n");
@@ -96,15 +97,17 @@ static void storage_add(const char *str) {
96static char* cwd = NULL; 97static char* cwd = NULL;
97 98
98static char *storage_find(const char *str) { 99static char *storage_find(const char *str) {
99#ifdef DEBUG
100 printf("storage find %s\n", str);
101#endif
102 if (!str) { 100 if (!str) {
103#ifdef DEBUG 101#ifdef DEBUG
104 printf("null pointer passed to storage_find\n"); 102 printf("null pointer passed to storage_find\n");
105#endif 103#endif
106 return NULL; 104 return NULL;
107 } 105 }
106
107#ifdef DEBUG
108 printf("storage find %s\n", str);
109#endif
110
108 const char *tofind = str; 111 const char *tofind = str;
109 int allocated = 0; 112 int allocated = 0;
110 113