MCPcopy Create free account
hub / github.com/audacity/audacity / shellMPrintf

Function shellMPrintf

lib-src/sqlite/shell.c:16929–16941  ·  view source on GitHub ↗

** If *pRc is not SQLITE_OK when this function is called, it is a no-op. ** Otherwise, zFmt is treated as a printf() style string. The result of ** formatting it along with any trailing arguments is written into a ** buffer obtained from sqlite3_malloc(), and pointer to which is returned. ** It is the responsibility of the caller to eventually free this buffer ** using a call to sqlite3_free(). *

Source from the content-addressed store, hash-verified

16927** pointer returned.
16928*/
16929static char *shellMPrintf(int *pRc, const char *zFmt, ...){
16930 char *z = 0;
16931 if( *pRc==SQLITE_OK ){
16932 va_list ap;
16933 va_start(ap, zFmt);
16934 z = sqlite3_vmprintf(zFmt, ap);
16935 va_end(ap);
16936 if( z==0 ){
16937 *pRc = SQLITE_NOMEM;
16938 }
16939 }
16940 return z;
16941}
16942
16943/*
16944** When running the ".recover" command, each output table, and the special

Callers 3

recoverNewTableFunction · 0.85
recoverOrphanTableFunction · 0.85
recoverDatabaseCmdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected