MCPcopy Create free account
hub / github.com/OpenPrinting/cups / cupsdSetStringf

Function cupsdSetStringf

scheduler/main.c:1344–1372  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1342 */
1343
1344void
1345cupsdSetStringf(char **s, /* O - New string */
1346 const char *f, /* I - Printf-style format string */
1347 ...) /* I - Additional args as needed */
1348{
1349 char v[65536 + 64]; /* Formatting string value */
1350 va_list ap; /* Argument pointer */
1351 char *olds; /* Old string */
1352
1353
1354 if (!s)
1355 return;
1356
1357 olds = *s;
1358
1359 if (f)
1360 {
1361 va_start(ap, f);
1362 vsnprintf(v, sizeof(v), f, ap);
1363 va_end(ap);
1364
1365 *s = strdup(v);
1366 }
1367 else
1368 *s = NULL;
1369
1370 if (olds)
1371 free(olds);
1372}
1373
1374
1375/*

Callers 11

cupsdReadClientFunction · 0.85
is_cgiFunction · 0.85
pipe_commandFunction · 0.85
cupsdSetEnvFunction · 0.85
save_auth_infoFunction · 0.85
cupsdLoadJobFunction · 0.85
cupsdReadConfigurationFunction · 0.85
read_cupsd_confFunction · 0.85
cupsdLoadAllClassesFunction · 0.85
mainFunction · 0.85
dnssdUpdateDNSSDNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected