[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 04 of 18] tools/blktap: remove unneeded pointer dereferencing from img2qcow.c



# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1333397521 -7200
# Node ID ae6bf2207a4e36ca6a60b42e82f79b8de09acec3
# Parent  90e2257cace2c3b7b8e7c4611614ad4da07ec895
tools/blktap: remove unneeded pointer dereferencing from img2qcow.c

img2qcow.c: In function 'print_bytes':
img2qcow.c:72:9: warning: value computed is not used [-Wunused-value]

Do not dereference pointer before increment.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>

diff -r 90e2257cace2 -r ae6bf2207a4e tools/blktap/drivers/img2qcow.c
--- a/tools/blktap/drivers/img2qcow.c
+++ b/tools/blktap/drivers/img2qcow.c
@@ -69,7 +69,7 @@ static void print_bytes(void *ptr, int l
     DFPRINTF("Buf dump, length %d:\n",length);
     for (k = 0; k < length; k++) {
         DFPRINTF("%x",*p);
-        *p++;
+        p++;
        if(k % 16 == 0) DFPRINTF("\n");
         else if(k % 2 == 0) DFPRINTF(" ");     
     }

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.