mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-05 13:28:08 +02:00
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
1 changed files with 2 additions and 2 deletions
|
|
@ -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…
Add table
Reference in a new issue