mirror of
https://github.com/DaveGamble/cJSON.git
synced 2026-10-18 10:59:49 +00:00
Replace sizeof('\0') with sizeof("")
Because sizeof('\0') is actually sizeof(int) not sizeof(char).
This commit is contained in:
1 parent
ab8489a851
commit
84237ff48e
3 files changed
+4
-4
No files matched your search
+1
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user