diff options
author | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2020-06-28 17:11:32 +0800 |
---|---|---|
committer | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2020-06-28 17:11:32 +0800 |
commit | 8c54bda950083a8b3f7420b03c7f4d1d8ceeaaa9 (patch) | |
tree | 433977a7536d0bfbb8f9c422528a4bd48127af36 | |
parent | 137ad27bed36437159ff9a29574a7ed840d4d96d (diff) |
Key product init
-rw-r--r-- | client.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -81,11 +81,9 @@ void icclient_order(icclient_ord_order **orderptr, const char *sku icclient_product **products = catalog->products; qsort(products, catalog->length, sizeof(icclient_product *), prodcmp); icclient_product *key_product = malloc(sizeof(icclient_product)); + icclient_product_init(key_product); key_product->sku = malloc(strlen(sku) + 1); strcpy(key_product->sku, sku); - key_product->description = NULL; - key_product->comment = NULL; - key_product->image = NULL; icclient_product *product = *(icclient_product **)bsearch(&key_product , products, catalog->length, sizeof(icclient_product *) , prodcmp); |