diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-01-24 18:53:15 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-01-24 18:53:15 +0800 |
commit | 39390f76cb75cfd5830495301cb08221e7934d5b (patch) | |
tree | c690d991a040f7e3d33542832110c5dfcce86917 | |
parent | 5ada0f76cc310c97d0cf8791ac321d9ac8a2a81e (diff) |
Simplify preferences by not making it a pointer
-rw-r--r-- | interchange/member.h | 2 | ||||
-rw-r--r-- | member.c | 2 | ||||
-rw-r--r-- | ord.c | 4 |
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; @@ -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) @@ -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"); } |