ltt-kconsumerd: Fix incorrect typing
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 27 Sep 2011 13:30:49 +0000 (09:30 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 27 Sep 2011 13:30:49 +0000 (09:30 -0400)
ltt-kconsumerd.c: In function ‘on_recv_fd’:
ltt-kconsumerd.c:298: warning: passing argument 2 of
‘kernctl_get_mmap_len’ from incompatible pointer type
../include/lttng-kernel-ctl.h:47: note: expected ‘long unsigned int *’
but argument is of type ‘size_t *’

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
ltt-kconsumerd/ltt-kconsumerd.c

index d562c1729d10bd562e46f16e59b05b43de6c8249..a81be55e7c9dbdaed5daf63c2c68d4c6280ac1a8 100644 (file)
@@ -295,12 +295,15 @@ static int on_recv_fd(struct lttng_kconsumerd_fd *kconsumerd_fd)
 
        if (kconsumerd_fd->output == LTTNG_EVENT_MMAP) {
                /* get the len of the mmap region */
-               ret = kernctl_get_mmap_len(kconsumerd_fd->consumerd_fd, &kconsumerd_fd->mmap_len);
+               unsigned long mmap_len;
+
+               ret = kernctl_get_mmap_len(kconsumerd_fd->consumerd_fd, &mmap_len);
                if (ret != 0) {
                        ret = errno;
                        perror("kernctl_get_mmap_len");
                        goto error_close_fd;
                }
+               kconsumerd_fd->mmap_len = (size_t) mmap_len;
 
                kconsumerd_fd->mmap_base = mmap(NULL, kconsumerd_fd->mmap_len,
                                PROT_READ, MAP_PRIVATE, kconsumerd_fd->consumerd_fd, 0);
This page took 0.027825 seconds and 4 git commands to generate.