summaryrefslogtreecommitdiff
path: root/msg.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2024-01-21 16:05:43 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2024-01-21 16:05:43 -0800
commit692b6a728e08ff4e936728b904d7b13bc4d301ed (patch)
tree9a2373c04a39b3d7be7e14cc94e1d9ea88bca987 /msg.c
parent8b22282c564763bb3fb6baf5aae7b341dfbb33db (diff)
Convert allocation calls to XtMallocArray or XtReallocArray where appropriate
Raises minimum libXt requirement to 1.3.0 for these calls Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'msg.c')
-rw-r--r--msg.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/msg.c b/msg.c
index 9f801bb..570aafc 100644
--- a/msg.c
+++ b/msg.c
@@ -302,8 +302,7 @@ static void SetScrnNewMsg(
}
} else {
msg->num_scrns++;
- msg->scrn = (Scrn *) XtRealloc((char *)msg->scrn,
- (unsigned) sizeof(Scrn)*msg->num_scrns);
+ msg->scrn = XtReallocArray(msg->scrn, msg->num_scrns, sizeof(Scrn));
msg->scrn[msg->num_scrns - 1] = scrn;
if (msg->source == NULL)
msg->source = CreateFileSource(scrn->viewwidget, MsgFileName(msg),