DICT_VALUE *v;
char buf[1024]; /* Interim buffer to use with poorly behaved printing functions */
char const *a = NULL;
+ char *p = out;
time_t t;
struct tm s_tm;
unsigned int i;
*out = '\0';
+ p = out;
+
switch (type) {
case PW_TYPE_STRING:
if (quote) {
if (freespace < 3) return inlen + 2;
- *out++ = quote;
+ *p++ = quote;
freespace--;
- len = fr_prints(out, freespace, data->strvalue, inlen, quote);
+ len = fr_prints(p, freespace, data->strvalue, inlen, quote);
/* always terminate the quoted string with another quote */
if (len >= (freespace - 1)) {
+ /* Use out not p as we're operating on the entire buffer */
out[outlen - 2] = (char) quote;
out[outlen - 1] = '\0';
return len + 2;
}
- out += len;
+ p += len;
freespace -= len;
- *out++ = (char) quote;
+ *p++ = (char) quote;
freespace--;
- *out = '\0';
+ *p = '\0';
return len + 2;
}
a = inet_ntop(AF_INET6, &addr, buf, sizeof(buf));
if (a) {
- char *p = buf;
+ p = buf;
len = strlen(buf);
p += len;
a = inet_ntop(AF_INET, &addr, buf, sizeof(buf));
if (a) {
- char *p = buf;
+ p = buf;
len = strlen(buf);
p += len;