]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Adapt returns of the os2Read() function to those of other platforms using checkin...
authorpweilbacher <pweilbacher@noemail.net>
Sun, 28 Jan 2007 21:12:13 +0000 (21:12 +0000)
committerpweilbacher <pweilbacher@noemail.net>
Sun, 28 Jan 2007 21:12:13 +0000 (21:12 +0000)
FossilOrigin-Name: ba76107cd1fc1898f5357b20b339727e2e034e23

manifest
manifest.uuid
src/os_os2.c

index 7b4e64a732d65eef6ed62864c70034f3eb9e6f13..905b50d1994205a8ac1e744344ee2b685dbe9671 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Version\s3.3.12\s(CVS\s3616)
-D 2007-01-27T14:30:15
+C Adapt\sreturns\sof\sthe\sos2Read()\sfunction\sto\sthose\sof\sother\splatforms\susing\scheckin\s(3549)\sto\sprevent\spossible\scorruption\s(CVS\s3617)
+D 2007-01-28T21:12:13
 F Makefile.in 7fa74bf4359aa899da5586e394d17735f221315f
 F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -77,7 +77,7 @@ F src/md5.c c5fdfa5c2593eaee2e32a5ce6c6927c986eaf217
 F src/os.c 59f05de8c5777c34876607114a2fbe55ae578235
 F src/os.h 17fc73165cb7436aa79492d2dff754baec74fcb9
 F src/os_common.h 545426356f0868a6765e70cb59e319d3acad0ed6
-F src/os_os2.c 1ece434c4817e2925318954336cfe1731713beb0
+F src/os_os2.c 79df76be8122c88fd7f7b6baad6d648e7906f688
 F src/os_os2.h e5f17dd69333632bbc3112881ea407c37d245eb3
 F src/os_test.c 49833426101f99aee4bb5f6a44b7c4b2029fda1c
 F src/os_test.h 903c93554c23d88f34f667f1979e4a1cee792af3
@@ -428,7 +428,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
 F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
-P 4d0d2063df2191155b290dc426b502bc7e1959c7
-R a2972c8d5fa2fae3aaf367594ddfe702
-U drh
-Z c458e87a08e33fa589eca60064bf3293
+P fc66070393b48f8022500c45e063068e801c05d7
+R fd8f3a50eb43815ad290d50ceebd0cd4
+U pweilbacher
+Z 31c655a3b0ec171471e488960acc1029
index 7ca190f8708bfd51f003c41ab5400a1b59f17f50..1df2c97cec4de08571cbc28679f2538d6569469d 100644 (file)
@@ -1 +1 @@
-fc66070393b48f8022500c45e063068e801c05d7
\ No newline at end of file
+ba76107cd1fc1898f5357b20b339727e2e034e23
\ No newline at end of file
index 0a008e1832c6224497b85f07a1bf320f4e8792a5..b127957c039f638ca1a9ed4ddf5f3d24569f1567 100644 (file)
@@ -296,7 +296,14 @@ int os2Read( OsFile *id, void *pBuf, int amt ){
   SimulateIOError( return SQLITE_IOERR );
   TRACE3( "READ %d lock=%d\n", ((os2File*)id)->h, ((os2File*)id)->locktype );
   DosRead( ((os2File*)id)->h, pBuf, amt, &got );
-  return (got == (ULONG)amt) ? SQLITE_OK : SQLITE_IOERR_SHORT_READ;
+  if (got == (ULONG)amt)
+    return SQLITE_OK;
+  else if (got < 0)
+    return SQLITE_IOERR_READ;
+  else {
+    memset(&((char*)pBuf)[got], 0, amt-got);
+    return SQLITE_IOERR_SHORT_READ;
+  }
 }
 
 /*