XQuartz: Silence clang static analyzer
Call to 'malloc' has an allocation size of 0 bytes. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
This commit is contained in:
parent
913223e9dd
commit
f1d867c0a1
|
@ -300,8 +300,8 @@ int main(int argc, char **argv, char **envp) {
|
|||
/* We have fixed-size string lengths due to limitations in IPC,
|
||||
* so we need to copy our argv and envp.
|
||||
*/
|
||||
newargv = (string_array_t)malloc(argc * sizeof(string_t));
|
||||
newenvp = (string_array_t)malloc(envpc * sizeof(string_t));
|
||||
newargv = (string_array_t)calloc((1 + argc), sizeof(string_t));
|
||||
newenvp = (string_array_t)calloc((1 + envpc), sizeof(string_t));
|
||||
|
||||
if(!newargv || !newenvp) {
|
||||
fprintf(stderr, "Xquartz: Memory allocation failure\n");
|
||||
|
|
Loading…
Reference in New Issue