2
0
mirror of https://git.zx2c4.com/cgit synced 2025-08-31 06:15:08 +00:00

refactor get_mimetype_from_file() to get_mimetype_for_filename()

* handle mimetype within a single function
* return allocated memory on success

Signed-off-by: Christian Hesse <mail@eworm.de>
This commit is contained in:
Christian Hesse
2015-08-16 14:53:52 +02:00
committed by Jason A. Donenfeld
parent f5c83d7b5d
commit aa943bc9a6
3 changed files with 40 additions and 47 deletions

2
cgit.h
View File

@@ -391,6 +391,6 @@ extern int readfile(const char *path, char **buf, size_t *size);
extern char *expand_macros(const char *txt);
extern char *get_mimetype_from_file(const char *filename, const char *ext);
extern char *get_mimetype_for_filename(const char *filename);
#endif /* CGIT_H */