diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-11-28 15:56:10 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-28 15:56:10 (GMT) |
commit | 598ceae876ff4a23072e59945597e945583de4ab (patch) | |
tree | a7c0c1380c40bda01c70b8bd40ba47d1b2f6d54a /Python/strdup.c | |
parent | 08d2b86a1058b733bb7f1ae2b55818dd9687d21c (diff) | |
download | cpython-598ceae876ff4a23072e59945597e945583de4ab.zip cpython-598ceae876ff4a23072e59945597e945583de4ab.tar.gz cpython-598ceae876ff4a23072e59945597e945583de4ab.tar.bz2 |
bpo-32150: Expand tabs to spaces in C files. (#4583)
Diffstat (limited to 'Python/strdup.c')
-rw-r--r-- | Python/strdup.c | 12 |
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; } |