Add an assertion to Person_print

main
Dan Buch 4 weeks ago
parent 01348b1436
commit 6ea704fe5b
Signed by: meatballhat
GPG Key ID: A12F782281063434

@ -33,6 +33,8 @@ void Person_destroy(struct Person *who)
void Person_print(struct Person *who) void Person_print(struct Person *who)
{ {
assert(who != NULL);
printf("Name: %s\n", who->name); printf("Name: %s\n", who->name);
printf("\tAge: %d\n", who->age); printf("\tAge: %d\n", who->age);
printf("\tHeight: %d\n", who->height); printf("\tHeight: %d\n", who->height);

Loading…
Cancel
Save