summaryrefslogtreecommitdiffstats
path: root/Python/strdup.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/strdup.c')
-rw-r--r--Python/strdup.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Python/strdup.c b/Python/strdup.c
index 769d3db..99dc774 100644
--- a/Python/strdup.c
+++ b/Python/strdup.c
@@ -5,10 +5,10 @@
char *
strdup(const char *str)
{
- if (str != NULL) {
- char *copy = malloc(strlen(str) + 1);
- if (copy != NULL)
- return strcpy(copy, str);
- }
- return NULL;
+ if (str != NULL) {
+ char *copy = malloc(strlen(str) + 1);
+ if (copy != NULL)
+ return strcpy(copy, str);
+ }
+ return NULL;
}