summaryrefslogtreecommitdiff
path: root/src/stralloc.c
diff options
context:
space:
mode:
authorJannis Hoffmann <jannis@fehcom.de>2024-07-09 15:50:21 +0200
committerJannis Hoffmann <jannis@fehcom.de>2024-07-09 15:50:21 +0200
commit795ffc5e62e8ba383575dbcd9943a580d4bd3358 (patch)
treec128889056202b255e2f22afeb7717894d350862 /src/stralloc.c
parent5fadc0cbb8577c61d66bd6f19ceaf0507c11e23b (diff)
formatting changes
Manual format adjustments. Comment adjustments. Remove usage of the register keyword.
Diffstat (limited to 'src/stralloc.c')
-rw-r--r--src/stralloc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/stralloc.c b/src/stralloc.c
index 8cd8a10..8351473 100644
--- a/src/stralloc.c
+++ b/src/stralloc.c
@@ -7,10 +7,10 @@
#include "str.h"
/**
- @file stralloc.c
- @author djb
- @source qmail, ucspi-tcp
- @brief genious dynamic string handling
+ @file stralloc.c
+ @author djb
+ @source qmail, ucspi-tcp
+ @brief genious dynamic string handling
*/
int stralloc_starts(stralloc *sa, const char *s)
@@ -48,10 +48,10 @@ int stralloc_copy(stralloc *sato, stralloc *safrom)
int stralloc_ready(stralloc *sa, size_t len)
{
- register size_t wanted = len + (len >> 3) + 30; /* heuristic from djb */
+ size_t wanted = len + (len >> 3) + 30; /* heuristic from djb */
if (wanted < len) wanted = len;
if (!sa->s || sa->a < len) {
- register char *tmp;
+ char *tmp;
if (!(tmp = realloc(sa->s, wanted))) // !!! needs stdlib (realloc)
return 0;
sa->a = wanted;