Get rid of mg_*asprintf

This commit is contained in:
cpq committed 2022-08-13 15:37:55 +01:00
1 parent ccf5364187
commit d76f86f7db
13 files changed
+88 -244

No files matched your search

+3 -7
View File
@@ -1785,13 +1785,9 @@ static void test_util(void) {
}
{
s = buf;
mg_asprintf(&s, sizeof(buf), "%3d", 123);
ASSERT(s == buf);
ASSERT(strcmp(buf, "123") == 0);
mg_asprintf(&s, sizeof(buf), "%.*s", 7, "a%40b.c");
ASSERT(s == buf);
ASSERT(strcmp(buf, "a%40b.c") == 0);
s = mg_mprintf("%3d", 123);
ASSERT(strcmp(s, "123") == 0);
free(s);
}
ASSERT(mg_to64(mg_str("-9223372036854775809")) == 0);