MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / recoverMPrintf

Function recoverMPrintf

modules/dasSQLITE/sqlite/shell.c:14037–14050  ·  view source on GitHub ↗

** This function is a no-op if recover handle p already contains an error ** (if p->errCode!=SQLITE_OK). NULL is returned in this case. ** ** Otherwise, an attempt is made to interpret zFmt as a printf() style ** formatting string and the result of using the trailing arguments for ** parameter substitution with it written into a buffer obtained from ** sqlite3_malloc(). If successful, a pointer to

Source from the content-addressed store, hash-verified

14035** handle and NULL returned.
14036*/
14037static char *recoverMPrintf(sqlite3_recover *p, const char *zFmt, ...){
14038 va_list ap;
14039 char *z;
14040 va_start(ap, zFmt);
14041 z = sqlite3_vmprintf(zFmt, ap);
14042 va_end(ap);
14043 if( p->errCode==SQLITE_OK ){
14044 if( z==0 ) p->errCode = SQLITE_NOMEM;
14045 }else{
14046 sqlite3_free(z);
14047 z = 0;
14048 }
14049 return z;
14050}
14051
14052/*
14053** This function is a no-op if recover handle p already contains an error

Callers 7

recoverTransferSettingsFunction · 0.85
recoverOpenRecoveryFunction · 0.85
recoverWriteSchema1Function · 0.85
recoverInsertStmtFunction · 0.85
sqlite3_recover_configFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected