Replace sizeof('\0') with sizeof("")

Because sizeof('\0') is actually sizeof(int) not sizeof(char).
This commit is contained in:
Max Bruckner
2017-03-06 10:40:01 +01:00
parent ab8489a851
commit 84237ff48e
3 changed files with 4 additions and 4 deletions

View File

@ -56,7 +56,7 @@ static char *read_file(const char *filename)
}
/* allocate content buffer */
content = (char*)malloc((size_t)length + sizeof('\0'));
content = (char*)malloc((size_t)length + sizeof(""));
if (content == NULL)
{
goto cleanup;