summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-01-24 18:53:15 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-01-24 18:53:15 +0800
commit39390f76cb75cfd5830495301cb08221e7934d5b (patch)
treec690d991a040f7e3d33542832110c5dfcce86917
parent5ada0f76cc310c97d0cf8791ac321d9ac8a2a81e (diff)
Simplify preferences by not making it a pointer
-rw-r--r--interchange/member.h2
-rw-r--r--member.c2
-rw-r--r--ord.c4
3 files changed, 3 insertions, 5 deletions
diff --git a/interchange/member.h b/interchange/member.h
index b44b1f5..569055e 100644
--- a/interchange/member.h
+++ b/interchange/member.h
@@ -47,7 +47,7 @@ struct interchange_member {
char *phone_night;
char *address_book;
char *accounts;
- struct interchange_member_preferences *preferences;
+ struct interchange_member_preferences preferences;
char *carts;
char *owner;
char *file_acl;
diff --git a/member.c b/member.c
index 79acc77..d2d6301 100644
--- a/member.c
+++ b/member.c
@@ -129,8 +129,6 @@ void interchange_member_logout(struct interchange_member *member)
free(member->address_book);
if (member->accounts)
free(member->accounts);
- if (member->preferences)
- free(member->preferences);
if (member->carts)
free(member->carts);
if (member->owner)
diff --git a/ord.c b/ord.c
index 5af1a91..3997b61 100644
--- a/ord.c
+++ b/ord.c
@@ -76,8 +76,8 @@ void interchange_ord_checkout(const struct interchange_ord_order *order, const s
{ "zip", member->zip },
{ "email", member->email },
{ "phone_day", member->phone_day },
- { "mv_same_billing", member->preferences->mv_same_billing? "1" : "0" },
- { "email_copy", member->preferences->email_copy? "1" : "0" }
+ { "mv_same_billing", member->preferences.mv_same_billing? "1" : "0" },
+ { "email_copy", member->preferences.email_copy? "1" : "0" }
}}, "%s", "ord/checkout");
}