diff options
| author | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-10-05 18:06:14 +0800 |
|---|---|---|
| committer | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-10-05 18:06:14 +0800 |
| commit | 89b7bef4c433bb42588eeec6e6f0d3d1c2a19b78 (patch) | |
| tree | 06e1c4e8373ea09bf683f21b277329279ae292bd /product.c | |
| parent | c5660800d60921392b66703b30dfc72d5f42d351 (diff) | |
Separate the product structure definition
so the catalog structure doesn't have to be included when not needed.
product.c has too few implementations, so it's merged to client.c
Diffstat (limited to 'product.c')
| -rw-r--r-- | product.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/product.c b/product.c deleted file mode 100644 index 33286cd..0000000 --- a/product.c +++ /dev/null @@ -1,19 +0,0 @@ -#include <stdlib.h> -#include "icclient/product.h" - -void icclient_catalog_free(struct icclient_catalog *catalog) -{ - for (size_t i = 0; i < catalog->length; i++) { - struct icclient_product *product = catalog->products[i]; - if (product->image) - free(product->image); - if (product->comment) - free(product->comment); - if (product->description) - free(product->description); - free(product->sku); - free(product); - } - free(catalog); - catalog = NULL; -} |