aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/utils.c
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2016-09-09 00:56:16 +0200
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2016-09-09 00:56:16 +0200
commitd97662894bab06133830c2936986b7f1e57ae26f (patch)
treec06087342e79d69b3e63f9577ef157e51a75b7af /src/common/utils.c
parente5f9cd349da231eae42ec9d35e3ebcd0d8fff973 (diff)
downloadblogc-d97662894bab06133830c2936986b7f1e57ae26f.tar.gz
blogc-d97662894bab06133830c2936986b7f1e57ae26f.tar.bz2
blogc-d97662894bab06133830c2936986b7f1e57ae26f.zip
common: rename macros
Diffstat (limited to 'src/common/utils.c')
-rw-r--r--src/common/utils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/utils.c b/src/common/utils.c
index 8397419..f745146 100644
--- a/src/common/utils.c
+++ b/src/common/utils.c
@@ -6,7 +6,7 @@
* See the file LICENSE.
*/
-#define SB_STRING_CHUNK_SIZE 128
+#define BC_STRING_CHUNK_SIZE 128
#include <string.h>
#include <stdarg.h>
@@ -389,7 +389,7 @@ bc_string_append_len(bc_string_t *str, const char *suffix, size_t len)
size_t old_len = str->len;
str->len += len;
if (str->len + 1 > str->allocated_len) {
- str->allocated_len = (((str->len + 1) / SB_STRING_CHUNK_SIZE) + 1) * SB_STRING_CHUNK_SIZE;
+ str->allocated_len = (((str->len + 1) / BC_STRING_CHUNK_SIZE) + 1) * BC_STRING_CHUNK_SIZE;
str->str = bc_realloc(str->str, str->allocated_len);
}
memcpy(str->str + old_len, suffix, len);
@@ -416,7 +416,7 @@ bc_string_append_c(bc_string_t *str, char c)
size_t old_len = str->len;
str->len += 1;
if (str->len + 1 > str->allocated_len) {
- str->allocated_len = (((str->len + 1) / SB_STRING_CHUNK_SIZE) + 1) * SB_STRING_CHUNK_SIZE;
+ str->allocated_len = (((str->len + 1) / BC_STRING_CHUNK_SIZE) + 1) * BC_STRING_CHUNK_SIZE;
str->str = bc_realloc(str->str, str->allocated_len);
}
str->str[old_len] = c;