[util] Make va thread-safe

It now takes a context pointer (opaque data) that holds the buffers it
uses for the temporary strings. If the context pointer is null, a static
context is used (making those uses of va NOT thread-safe). Most calls to
va use the static context, but all such calls have been formatted
consistently so they are easy to find when it comes time to do a full
audit.
This commit is contained in:
Bill Currie 2021-01-31 16:01:20 +09:00
parent f523f6ba80
commit 7970525ef4
108 changed files with 505 additions and 390 deletions

View file

@ -150,7 +150,7 @@ CF_BuildQuota (void)
cf_cursize = 0;
while ((i = readdir (dir))) {
cf_cursize += CF_GetFileSize (va ("%s/%s", path->str, i->d_name));
cf_cursize += CF_GetFileSize (va (0, "%s/%s", path->str, i->d_name));
}
closedir (dir);
}