diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-03-02 16:19:08 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-03-02 16:19:08 -0500 |
commit | d49db7d0981861d979765647cce3c6468a012301 (patch) | |
tree | f6d8c12a34978292337954daa85acd5031b4c8ec /src/mime.c | |
parent | e30c8ffa406e377432bae6a9b7fbd41b046da201 (diff) | |
download | spmc-d49db7d0981861d979765647cce3c6468a012301.tar.gz |
Refactor startswith() and endswidth() usage
Diffstat (limited to 'src/mime.c')
-rw-r--r-- | src/mime.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -103,7 +103,7 @@ int file_is_text(const char *filename) { int result = 0; char *path = normpath(filename); Mime *type = file_mimetype(path); - if (startswith(type->type, "text/") == 0) { + if (startswith(type->type, "text/")) { result = 1; } free(path); @@ -120,7 +120,7 @@ int file_is_binary(const char *filename) { int result = 0; char *path = normpath(filename); Mime *type = file_mimetype(path); - if (startswith(type->type, "application/") == 0 && strcmp(type->charset, "binary") == 0) { + if (startswith(type->type, "application/") && strcmp(type->charset, "binary") == 0) { result = 1; } free(path); |