чување 18fdf75c561d53e8bda91a97ec4b51fe757aebc2
родитељ 0eefb4be3aff0c27b09cfc93d25d5f1b25fccfad
Аутор: Страхиња Радић <contact@strahinja.org>
Датум: Thu, 28 Jan 2021 15:39:22 +0100
Small optimization, as now warning is issued instead of exit in process_git_log
Signed-off-by: Страхиња Радић <contact@strahinja.org>
Diffstat:
измењених датотека: 2, додавања: 2(+), брисања: 7(-)
diff --git a/index.html b/index.html
@@ -136,7 +136,7 @@ this program. If not, see <<a href="https://www.gnu.org/licenses">https://www
<div id="git-log">
Previous commit:
-index.slw 3ab2445 2021-01-25 21:07:42 +0100 (Страхиња Радић) (HEAD -> master, origin/master, origin/HEAD)
+index.slw 0eefb4b 2021-01-28 15:33:39 +0100 (Страхиња Радић) (HEAD -> master, tag: v0.3.7, origin/master, origin/HEAD)
</div><!--git-log-->
diff --git a/slweb.c b/slweb.c
@@ -422,16 +422,11 @@ process_git_log(FILE* output)
(const uint8_t**)CMD_GIT_LOG_ARGS,
(const uint8_t**)pipe_args, output, FALSE);
- if (result)
- {
- print_output(output, "</div><!--git-log-->\n");
- return warning(result, (uint8_t*)"git-log: Cannot run git");
- }
print_output(output, "</div><!--git-log-->\n");
free(basename);
- return 0;
+ return result ? warning(result, (uint8_t*)"git-log: Cannot run git") : 0;
}
int