Rewrite void* arithmetic
cppcheck reported: [chessbox/chessbox_pgn.c:51]: (portability) 'bufptr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. Change-Id: Ib2139489fa316fb61b4bcdc08f17b97eb6ad0be7
This commit is contained in:
parent
8628c60469
commit
35d69c80a6
1 changed files with 1 additions and 1 deletions
|
@ -48,7 +48,7 @@ static void *pl_malloc(size_t size)
|
|||
}
|
||||
else
|
||||
{
|
||||
bufptr += size;
|
||||
bufptr = (char*)(bufptr) + size;
|
||||
bufleft -= size;
|
||||
return ptr;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue