Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.zx2c4.com/cgit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/cgit.c
diff options
context:
space:
mode:
Diffstat (limited to 'cgit.c')
-rw-r--r--cgit.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/cgit.c b/cgit.c
index 42beace..c33e6fc 100644
--- a/cgit.c
+++ b/cgit.c
@@ -789,9 +789,7 @@ static char *build_snapshot_setting(int bitmap)
static char *get_first_line(char *txt)
{
char *t = xstrdup(txt);
- char *p = strchr(t, '\n');
- if (p)
- *p = '\0';
+ *strchrnul(t, '\n') = '\0';
return t;
}