From 1160cdb21e0b667269299853cb47a4aa88948dc3 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 12 Jun 2026 17:20:08 +0200 Subject: unify my .clang-format files --- src/string.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/string.c') diff --git a/src/string.c b/src/string.c index b610e2f..7c09f4f 100644 --- a/src/string.c +++ b/src/string.c @@ -6,6 +6,7 @@ */ #include "string.h" + #include "log.h" #include @@ -14,14 +15,13 @@ /* glibc calls this stpecpy; it's not provided by glibc; however, it does * provide a possible implementation in string_copying(7), which I copied from. */ -char *string_append(char *dst, char *end, const char *src) -{ +char* string_append(char* dst, char* end, const char* src) { if (!dst) return NULL; if (dst == end) return end; - char *p = memccpy(dst, src, '\0', end - dst); + char* p = memccpy(dst, src, '\0', end - dst); if (p) return p - 1; @@ -29,9 +29,8 @@ char *string_append(char *dst, char *end, const char *src) return end; } -int string_to_int(const char *src, int *result) -{ - char *endptr = NULL; +int string_to_int(const char* src, int* result) { + char* endptr = NULL; errno = 0; long ret = strtol(src, &endptr, 10); -- cgit v1.3