diff options
Diffstat (limited to 'src/Shell.c')
-rw-r--r-- | src/Shell.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Shell.c b/src/Shell.c index 5cf4bc2..82616ef 100644 --- a/src/Shell.c +++ b/src/Shell.c @@ -3492,8 +3492,8 @@ EditCommand(_XtString str, /* if not NULL, the sm_client_id */ count++; if (want) { - s = new = (_XtString *) - __XtMalloc((Cardinal) ((size_t) (count + 3) * sizeof(_XtString *))); + s = new = XtMallocArray((Cardinal) count + 3, + (Cardinal) sizeof(_XtString *)); *s = *sarray; s++; sarray++; @@ -3508,8 +3508,8 @@ EditCommand(_XtString str, /* if not NULL, the sm_client_id */ else { if (count < 3) return NewStringArray(sarray); - s = new = (_XtString *) - __XtMalloc((Cardinal) ((size_t) (count - 1) * sizeof(_XtString *))); + s = new = XtMallocArray((Cardinal) count - 1, + (Cardinal) sizeof(_XtString *)); for (; --count >= 0; sarray++) { if (strcmp(*sarray, "-xtsessionID") == 0) { sarray++; |