summaryrefslogtreecommitdiffhomepage
path: root/misc/examples/person_arc.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc/examples/person_arc.c')
-rw-r--r--misc/examples/person_arc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/misc/examples/person_arc.c b/misc/examples/person_arc.c
index b4b926da..3614c02d 100644
--- a/misc/examples/person_arc.c
+++ b/misc/examples/person_arc.c
@@ -6,7 +6,8 @@
typedef struct { cstr name, last; } Person;
Person Person_make(const char* name, const char* last) {
- return (Person){.name = cstr_from(name), .last = cstr_from(last)};
+ Person p = {.name = cstr_from(name), .last = cstr_from(last)};
+ return p;
}
int Person_cmp(const Person* a, const Person* b) {