[PATCH 1/1] ui-summary: add parentheses for conditions

Christian Hesse list at eworm.de
Mon Aug 17 14:42:40 CEST 2015


From: Christian Hesse <mail at eworm.de>

Signed-off-by: Christian Hesse <mail at eworm.de>
---
 ui-summary.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui-summary.c b/ui-summary.c
index 34ca329..8e81ac4 100644
--- a/ui-summary.c
+++ b/ui-summary.c
@@ -105,7 +105,7 @@ void cgit_print_repo_readme(char *path)
 	int free_filename = 0;
 
 	mimetype = get_mimetype_for_filename(path);
-	if (mimetype && !strncmp(mimetype, "image/", 6) || !strncmp(mimetype, "video/", 6)) {
+	if (mimetype && (!strncmp(mimetype, "image/", 6) || !strncmp(mimetype, "video/", 6))) {
 		ctx.page.mimetype = mimetype;
 		ctx.page.charset = NULL;
 		cgit_print_plain();
-- 
2.5.0



More information about the CGit mailing list