aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authordan <dan@noemail.net>2010-11-29 17:55:18 +0000
committerdan <dan@noemail.net>2010-11-29 17:55:18 +0000
commit0cb3a1eca4eddefe3ad58def667dc73646f95830 (patch)
tree66dc02fda7917ac3293460a7e076dc265f945fac /src/os_unix.c
parent5957b1bc7340ab5310664fed981430b2367f9d44 (diff)
downloadsqlite-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.c10
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;