diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2022-07-27 12:50:10 -0300 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2022-07-27 12:51:19 -0300 |
commit | 2f6194a3e83d8f8b7ea3b38ccf37028592ea5710 (patch) | |
tree | 2d6bfbf02e1c091cdaf295355d2fab3992968e45 /misc.c | |
parent | bcc2745e9c9a2ea7d07100661f399a5635862e31 (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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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"); |