(platform_linux.c) CXX_BUILD fix

This commit is contained in:
twinaphex 2015-09-17 10:14:57 +02:00
parent d8243945f2
commit 2b2767017c
2 changed files with 4 additions and 4 deletions

View file

@ -245,7 +245,6 @@ typedef struct
*/
static void cpulist_parse(CpuList* list, const char* line, int line_len)
{
const char* q;
const char* p = line;
const char* end = p + line_len;
@ -255,10 +254,10 @@ static void cpulist_parse(CpuList* list, const char* line, int line_len)
while (p < end && *p != '\n')
{
int val, start_value, end_value;
/* Find the end of current item, and put it into 'q' */
q = memchr(p, ',', end-p);
if (q == NULL)
const char *q = (const char*)memchr(p, ',', end-p);
if (!q)
q = end;
/* Get first value */

View file

@ -224,6 +224,7 @@ int libretrodb_open(const char *path, libretrodb_t *db)
db->first_index_offset = lseek(fd, 0, SEEK_CUR);
db->fd = fd;
return 0;
error:
close(fd);
return rv;