mem_d(name);
return false;
}
- /* reassign name */
- mem_d(name);
- name = util_strchp(name, strchr(name, ','));
-
/*
* Now add the following items to the code system:
* function
for (itr = 0; itr < items_elements; itr++)
mem_d(items_data[itr].name);
mem_d(items_data);
-
+
util_meminfo();
return 0;
}
char *util_strchp(const char *s, const char *e) {
if (!s || !e)
return NULL;
+
+ const char *c = s;
+ while (c != e)
+ c++;
- size_t m = 0;
- char *c = util_strdup(s);
- while (s != e)
- s++,c++,m++;
-
- *c = '\0';
- return c-m;
+ return util_strdup(s);
}
/*