summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2023-09-23 12:11:31 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2023-09-23 12:18:20 -0700
commitf59fbae7a1890b243c69f0ff20099c6d6aa93c4e (patch)
tree857748048e99552f2310b7a968a1d5e86177e837
parent6e6917dd5918f5ae520f71e53128eee3267656b8 (diff)
XdmcpWriteHeader: drop unnecessary cast of free() argument
Clears clang complaint: Write.c:48:7: warning: cast from 'BYTE *' (aka 'unsigned char *') to 'unsigned long *' increases required alignment from 1 to 8 [-Wcast-align] free((unsigned long *)(buffer->data)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--Write.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Write.c b/Write.c
index 8eb9c50..ef7f030 100644
--- a/Write.c
+++ b/Write.c
@@ -45,7 +45,7 @@ XdmcpWriteHeader (
newData = (BYTE *) malloc(XDM_MAX_MSGLEN * sizeof (BYTE));
if (!newData)
return FALSE;
- free((unsigned long *)(buffer->data));
+ free(buffer->data);
buffer->data = newData;
buffer->size = XDM_MAX_MSGLEN;
}