summary refs log tree commit diff stats
path: root/c
diff options
context:
space:
mode:
Diffstat (limited to 'c')
-rw-r--r--c/acronym/src/acronym.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/c/acronym/src/acronym.c b/c/acronym/src/acronym.c
index 9d86a6d..6bc3b10 100644
--- a/c/acronym/src/acronym.c
+++ b/c/acronym/src/acronym.c
@@ -3,8 +3,7 @@
 #include <stdlib.h>
 
 char *abbreviate(const char *phrase) {
-    if (phrase == NULL) return NULL;
-    if (phrase[0] == '\0') return NULL;
+    if (phrase == NULL || phrase[0] == '\0') return NULL;
 
     size_t pos = 0;
     char *acronym = malloc(1 * sizeof(char));