From 39390f76cb75cfd5830495301cb08221e7934d5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Tue, 24 Jan 2023 18:53:15 +0800 Subject: Simplify preferences by not making it a pointer --- interchange/member.h | 2 +- member.c | 2 -- 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; 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"); } -- cgit v1.2.3