** 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
| 14035 | ** handle and NULL returned. |
| 14036 | */ |
| 14037 | static 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 |
no outgoing calls
no test coverage detected