Skip to content

Commit 1203059

Browse files
project 4
1 parent 8f75df2 commit 1203059

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

0x0E-structures_typedef/4-new_dog.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ dog_t *new_dog(char *name, float age, char *owner)
1414
char *cpyname, *cpyowner;
1515
int len_name = 0, len_owner = 0, i;
1616

17+
if (name == NULL || owner == NULL)
18+
return (NULL);
19+
1720
while (name[len_name])
1821
len_name++;
1922
while (owner[len_owner])

0x0E-structures_typedef/e

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)