}
}
len += entry_lenlen(0); /* NUL byte at end */
- len += entry_lenlen(nat) + entry_lenlen(nval);
+ len += entry_lenlen(nat);
+ len += entry_lenlen(nval);
*plen = len;
*pnattrs = nat;
*pnvals = nval;
*ptr++ = '\0';
if (a->a_vals) {
for (i=0; a->a_vals[i].bv_val; i++);
- entry_putlen(&ptr, i);
- for (i=0; a->a_vals[i].bv_val; i++) {
- entry_putlen(&ptr, a->a_vals[i].bv_len);
- AC_MEMCPY(ptr, a->a_vals[i].bv_val,
- a->a_vals[i].bv_len);
- ptr += a->a_vals[i].bv_len;
- *ptr++ = '\0';
- }
- if (a->a_nvals != a->a_vals) {
entry_putlen(&ptr, i);
- for (i=0; a->a_nvals[i].bv_val; i++) {
- entry_putlen(&ptr, a->a_nvals[i].bv_len);
- AC_MEMCPY(ptr, a->a_nvals[i].bv_val,
- a->a_nvals[i].bv_len);
- ptr += a->a_nvals[i].bv_len;
+ for (i=0; a->a_vals[i].bv_val; i++) {
+ entry_putlen(&ptr, a->a_vals[i].bv_len);
+ AC_MEMCPY(ptr, a->a_vals[i].bv_val,
+ a->a_vals[i].bv_len);
+ ptr += a->a_vals[i].bv_len;
*ptr++ = '\0';
}
+ if (a->a_nvals != a->a_vals) {
+ entry_putlen(&ptr, i);
+ for (i=0; a->a_nvals[i].bv_val; i++) {
+ entry_putlen(&ptr, a->a_nvals[i].bv_len);
+ AC_MEMCPY(ptr, a->a_nvals[i].bv_val,
+ a->a_nvals[i].bv_len);
+ ptr += a->a_nvals[i].bv_len;
+ *ptr++ = '\0';
+ }
} else {
entry_putlen(&ptr, 0);
}