summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--interchange.c3
-rw-r--r--interchange.h2
-rw-r--r--interchange/ord.h2
3 files changed, 3 insertions, 4 deletions
diff --git a/interchange.c b/interchange.c
index 55bbdd0..b173614 100644
--- a/interchange.c
+++ b/interchange.c
@@ -87,13 +87,12 @@ void interchange_free_product(struct interchange_product *product)
if (product->title)
free(product->title);
free(product->sku);
- free(product);
}
void interchange_free_catalog(struct interchange_catalog *catalog)
{
for (size_t i = 0; i < catalog->length; i++)
- interchange_free_product(catalog->products[i]);
+ interchange_free_product(&catalog->products[i]);
free(catalog);
}
diff --git a/interchange.h b/interchange.h
index 2ca9fb8..e890708 100644
--- a/interchange.h
+++ b/interchange.h
@@ -23,7 +23,7 @@ struct interchange_product {
struct interchange_catalog {
size_t length;
- struct interchange_product *products[];
+ struct interchange_product products[];
};
/*!
diff --git a/interchange/ord.h b/interchange/ord.h
index 2202243..d6ce999 100644
--- a/interchange/ord.h
+++ b/interchange/ord.h
@@ -4,7 +4,7 @@
#include "interchange/typedefs.h"
struct interchange_ord_item {
- struct interchange_product *product;
+ struct interchange_product product;
unsigned int quantity;
};