~lbnz/xr0

ba71e4ae984acf741c0e344646c59165d65b9adf — Amisi Kiarie 3 months ago f4d8901
remove ub?
1 files changed, 7 insertions(+), 3 deletions(-)

M src/util/util.c
M src/util/util.c => src/util/util.c +7 -3
@@ 332,7 332,7 @@ error_nest(struct error *outer, struct error *inner)
struct error *
error_printf(char *fmt, ...)
{
	char *otherfmt;
	char *otherfmt; char *otherarg;
	struct error *inner;

	struct error *err = calloc(1, sizeof(struct error));


@@ 355,12 355,16 @@ error_printf(char *fmt, ...)
			);
			err = error_nest(err, inner);
			break;
		default:
		case 's':
			otherfmt = findnextfmt(&p);
			strbuilder_vprintf(b, otherfmt, ap);
			otherarg = va_arg(ap, char *);
			strbuilder_printf(b, otherfmt, otherarg);
			free(otherfmt);
			p--; /* prepare for increment */
			break;
		default:
			/* unrecognised option */
			assert(false);
		}
	}
	char *s = strbuilder_build(b);