summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2022-07-27 12:50:10 -0300
committermrb0nk500 <b0nk@b0nk.xyz>2022-07-27 12:51:19 -0300
commit2f6194a3e83d8f8b7ea3b38ccf37028592ea5710 (patch)
tree2d6bfbf02e1c091cdaf295355d2fab3992968e45 /misc.c
parentbcc2745e9c9a2ea7d07100661f399a5635862e31 (diff)
misc: Use `is_empty()` instead of just checking if `*str` is NULL in
`get_line()`
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/misc.c b/misc.c
index cb4c108..6ac35ff 100644
--- a/misc.c
+++ b/misc.c
@@ -56,7 +56,7 @@ char *read_file(const char *filename, long *size) {
}
char *get_line(char **str) {
- if (str == NULL || *str == NULL) {
+ if (str == NULL || is_empty(*str)) {
return NULL;
} else {
size_t i = strcspn(*str, "\n");