MD5Transform(ctx->buf, (uint32_t *) ctx->in);
byteReverse((unsigned char *) ctx->buf, 4);
memcpy(digest, ctx->buf, 16);
- memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */
+ memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */
}
/* The four core functions - F1 is optimized somewhat */
if (!cpu)
return -1;
- memset(r, 0, sizeof(r));
+ memset(r, 0, sizeof(*r));
if (w64)
kdd_get_regs_x86_64(cpu, &r->r64);
return rc;
/* let the vm run */
- memset(ctxt, 0, sizeof(ctxt));
+ memset(ctxt, 0, sizeof(*ctxt));
if ( (rc = dom->arch_hooks->vcpu(dom, ctxt)) != 0 )
return rc;
xc_dom_unmap_all(dom);
ret = libxl_fd_set_cloexec(qmp->ctx, qmp->qmp_fd, 1);
if (ret) return -1;
- memset(&qmp->addr, 0, sizeof (&qmp->addr));
+ memset(&qmp->addr, 0, sizeof (qmp->addr));
qmp->addr.sun_family = AF_UNIX;
strncpy(qmp->addr.sun_path, qmp_socket_path,
sizeof (qmp->addr.sun_path));
int sndbuf = 32768;
int rcvbuf = 32768;
- memset(rth, 0, sizeof(rth));
+ memset(rth, 0, sizeof(*rth));
rth->fd = socket(AF_NETLINK, SOCK_RAW, protocol);
if (rth->fd < 0) {
/* Initialize all variables called has passed as non-NULL to zeros */
if (iface != NULL)
- memset(iface, 0, sizeof(iface));
+ memset(iface, 0, sizeof(*iface));
if (rxBytes != NULL)
*rxBytes = 0;
if (rxPackets != NULL)