diff options
author | dan <dan@noemail.net> | 2010-11-29 17:55:18 +0000 |
---|---|---|
committer | dan <dan@noemail.net> | 2010-11-29 17:55:18 +0000 |
commit | 0cb3a1eca4eddefe3ad58def667dc73646f95830 (patch) | |
tree | 66dc02fda7917ac3293460a7e076dc265f945fac /src/os_unix.c | |
parent | 5957b1bc7340ab5310664fed981430b2367f9d44 (diff) | |
download | sqlite-0cb3a1eca4eddefe3ad58def667dc73646f95830.tar.gz sqlite-0cb3a1eca4eddefe3ad58def667dc73646f95830.zip |
Fix compiler warnings discovered while building SQLite on [http://www.devio.us/].
FossilOrigin-Name: 5602ec95aa2a74d0624bb6c7d53e7a0d35536253
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 4dc18b83a..bd64b88cd 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -5457,27 +5457,27 @@ static int proxyBreakConchLock(unixFile *pFile, uuid_t myHostID){ pathLen = strlcpy(tPath, cPath, MAXPATHLEN); if( pathLen>MAXPATHLEN || pathLen<6 || (strlcpy(&tPath[pathLen-5], "break", 6) != 5) ){ - sprintf(errmsg, "path error (len %d)", (int)pathLen); + sqlite3_snprintf(sizeof(errmsg),errmsg,"path error (len %d)",(int)pathLen); goto end_breaklock; } /* read the conch content */ readLen = pread(conchFile->h, buf, PROXY_MAXCONCHLEN, 0); if( readLen<PROXY_PATHINDEX ){ - sprintf(errmsg, "read error (len %d)", (int)readLen); + sqlite3_snprintf(sizeof(errmsg),errmsg,"read error (len %d)",(int)readLen); goto end_breaklock; } /* write it out to the temporary break file */ fd = open(tPath, (O_RDWR|O_CREAT|O_EXCL), SQLITE_DEFAULT_FILE_PERMISSIONS); if( fd<0 ){ - sprintf(errmsg, "create failed (%d)", errno); + sqlite3_snprintf(sizeof(errmsg), errmsg, "create failed (%d)", errno); goto end_breaklock; } if( pwrite(fd, buf, readLen, 0) != (ssize_t)readLen ){ - sprintf(errmsg, "write failed (%d)", errno); + sqlite3_snprintf(sizeof(errmsg), errmsg, "write failed (%d)", errno); goto end_breaklock; } if( rename(tPath, cPath) ){ - sprintf(errmsg, "rename failed (%d)", errno); + sqlite3_snprintf(sizeof(errmsg), errmsg, "rename failed (%d)", errno); goto end_breaklock; } rc = 0; |