diff options
Diffstat (limited to 'src/os_os2.c')
-rw-r--r-- | src/os_os2.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/os_os2.c b/src/os_os2.c index 058a80130..fb175e8c9 100644 --- a/src/os_os2.c +++ b/src/os_os2.c @@ -12,7 +12,7 @@ ** ** This file contains code that is specific to OS/2. ** -** $Id: os_os2.c,v 1.60 2008/11/22 19:50:54 pweilbacher Exp $ +** $Id: os_os2.c,v 1.61 2008/11/26 19:56:48 pweilbacher Exp $ */ #include "sqliteInt.h" @@ -966,8 +966,12 @@ static void os2DlClose(sqlite3_vfs *pVfs, void *pHandle){ ** Write up to nBuf bytes of randomness into zBuf. */ static int os2Randomness(sqlite3_vfs *pVfs, int nBuf, char *zBuf ){ - int sizeofULong = sizeof(ULONG); int n = 0; +#if defined(SQLITE_TEST) + n = nBuf; + memset(zBuf, 0, nBuf); +#else + int sizeofULong = sizeof(ULONG); if( (int)sizeof(DATETIME) <= nBuf - n ){ DATETIME x; DosGetDateTime(&x); @@ -1015,6 +1019,7 @@ static int os2Randomness(sqlite3_vfs *pVfs, int nBuf, char *zBuf ){ n += sizeofULong; } } +#endif return n; } |