diff options
author | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2020-06-29 14:48:07 +0800 |
---|---|---|
committer | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2020-06-29 14:48:07 +0800 |
commit | f9ccf11dab8e7ffef363c774c94c660c144f8efb (patch) | |
tree | 371268fbd61a2964188605a0f46d792f0de95ea9 /client.c | |
parent | 3dd44e9bd785d14bd867fa9ca9f17365238578c7 (diff) |
Reorder the order function parameters
Diffstat (limited to 'client.c')
-rw-r--r-- | client.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -75,10 +75,10 @@ static int itemcmp(const void *item1, const void *item2) , (*(icclient_ord_item * const *)item2)->product->sku); } -void icclient_order(icclient_ord_order **orderptr, const char *sku - , icclient_catalog *catalog) +void icclient_order(const char *sku, const icclient_catalog *catalog, + icclient_ord_order **orderptr) { - icclient_product **products = catalog->products; + icclient_product **products = ((icclient_catalog *)catalog)->products; qsort(products, catalog->length, sizeof(icclient_product *), prodcmp); icclient_product *key_product = malloc(sizeof(icclient_product)); icclient_product_init(key_product); |