summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/client.c b/client.c
index 3e92aff..4bec7bb 100644
--- a/client.c
+++ b/client.c
@@ -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);