summaryrefslogtreecommitdiff
path: root/catalog.c
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2021-06-13 07:06:14 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2021-06-13 07:06:30 +0800
commitb188f0557911ddb353f8b78d6770ba9fd0114329 (patch)
treefe54cdb1a6fac9bf6822427597c9596f5a3dc066 /catalog.c
parent07435e79294202706ccf71f91eab48bcd122c459 (diff)
Just use memset instead of a special init function
Diffstat (limited to 'catalog.c')
-rw-r--r--catalog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/catalog.c b/catalog.c
index caaef04..92dce73 100644
--- a/catalog.c
+++ b/catalog.c
@@ -41,7 +41,7 @@ size_t icclient_catalog_results(void *data, size_t size, size_t nmemb, void *use
for (size_t i = 0; i < length; i++) {
catalog->products[i] = malloc(sizeof(struct icclient_product));
struct icclient_product *product = catalog->products[i];
- icclient_product_init(product);
+ memset(product, '\0', sizeof(struct icclient_product));
json_object *object = json_object_array_get_idx(products, i);
struct json_object_iterator iterator = json_object_iter_begin(object);
struct json_object_iterator iterator_end = json_object_iter_end(object);