diff options
Diffstat (limited to 'sockutil.c')
-rw-r--r-- | sockutil.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -1,5 +1,5 @@ /* - * Copyright © 2005,2006 Red Hat, Inc. All rights reserved. + * Copyright © 2005,20068 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions of the @@ -143,9 +143,7 @@ send_packet(int fd, struct qa_packet *qp) char *packetbuf; int packetsize; ssize_t ret; - - packetbuf = malloc(QARSH_MAX_PACKET_SIZE); - memset(packetbuf, 0, QARSH_MAX_PACKET_SIZE); + packetbuf = qptostr(qp, &packetbuf, &packetsize); ret = write(fd, packetbuf, packetsize); |