Minor fixes and refactors
This commit is contained in:
@@ -47,7 +47,7 @@ struct BH_Bitmap
|
||||
};
|
||||
|
||||
|
||||
const static struct FormatInfo formats[] =
|
||||
static const struct FormatInfo formats[] =
|
||||
{
|
||||
/* BH_BITMAP_INDEX1 */
|
||||
{TYPE_INDEX1, 7, {0x0001}, {7, 6, 5, 4, 3, 2, 1, 0}, 0},
|
||||
|
||||
@@ -76,6 +76,7 @@ static int bytesSeek(BH_Bytes *bytes,
|
||||
|
||||
switch (info->whence)
|
||||
{
|
||||
default:
|
||||
case BH_IO_SEEK_SET:
|
||||
offset = MAX(info->offset, 0);
|
||||
offset = MIN(offset, (int64_t)bytes->size);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
static int convertToTimespec(struct timespec *ts,
|
||||
uint32_t timeout)
|
||||
uint32_t timeout)
|
||||
{
|
||||
#if (_POSIX_TIMERS > 0) || defined(BH_USE_CLOCK_GETTIME)
|
||||
if (clock_gettime(CLOCK_REALTIME, ts))
|
||||
|
||||
Reference in New Issue
Block a user