@@ -39,11 +39,11 @@ #import "OFString.h" #import "OFLocale.h" #import "OFInitializationFailedException.h" -#define MAX_SUBFORMAT_LEN 64 +#define maxSubformatLen 64 #ifndef HAVE_ASPRINTF /* * (v)asprintf might be declared, but HAVE_ASPRINTF not defined because * configure determined it is broken. In this case, we must make sure there is @@ -54,11 +54,11 @@ #endif struct context { const char *format; size_t formatLen; - char subformat[MAX_SUBFORMAT_LEN + 1]; + char subformat[maxSubformatLen + 1]; size_t subformatLen; va_list arguments; char *buffer; size_t bufferLen; size_t i, last; @@ -169,11 +169,11 @@ static bool appendSubformat(struct context *ctx, const char *subformat, size_t subformatLen) { - if (ctx->subformatLen + subformatLen > MAX_SUBFORMAT_LEN) + if (ctx->subformatLen + subformatLen > maxSubformatLen) return false; memcpy(ctx->subformat + ctx->subformatLen, subformat, subformatLen); ctx->subformatLen += subformatLen; ctx->subformat[ctx->subformatLen] = 0; @@ -718,11 +718,11 @@ } free(tmp); } - memset(ctx->subformat, 0, MAX_SUBFORMAT_LEN); + memset(ctx->subformat, 0, maxSubformatLen); ctx->subformatLen = 0; ctx->lengthModifier = LengthModifierNone; ctx->useLocale = false; ctx->last = ctx->i + 1; @@ -744,11 +744,11 @@ { struct context ctx; ctx.format = format; ctx.formatLen = strlen(format); - memset(ctx.subformat, 0, MAX_SUBFORMAT_LEN + 1); + memset(ctx.subformat, 0, maxSubformatLen + 1); ctx.subformatLen = 0; va_copy(ctx.arguments, arguments); ctx.bufferLen = 0; ctx.last = 0; ctx.state = StateString;