diff options
| author | Jason A. Donenfeld <Jason@zx2c4.com> | 2026-05-04 19:02:57 +0300 |
|---|---|---|
| committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2026-05-04 19:28:27 +0300 |
| commit | e7e8cf1801b06a9f7f5092671b0413689a765fe7 (patch) | |
| tree | d052a194b3c9c2ff0f7dd37be44408a04bcdb114 /cgit.c | |
| parent | 5b4e73c203f5f4484d66f043f1e9114daefeb632 (diff) | |
cgit: use strchrnul instead of open coding
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'cgit.c')
| -rw-r--r-- | cgit.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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; } |
