Module Name:    src
Committed By:   christos
Date:           Mon Mar  7 00:51:32 UTC 2016

Modified Files:
        src/sys/rump/librump/rumpvfs: rumpfs.c

Log Message:
Avoid void * arithmetic


To generate a diff of this commit:
cvs rdiff -u -r1.139 -r1.140 src/sys/rump/librump/rumpvfs/rumpfs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpvfs/rumpfs.c
diff -u src/sys/rump/librump/rumpvfs/rumpfs.c:1.139 src/sys/rump/librump/rumpvfs/rumpfs.c:1.140
--- src/sys/rump/librump/rumpvfs/rumpfs.c:1.139	Sun Mar  6 14:47:41 2016
+++ src/sys/rump/librump/rumpvfs/rumpfs.c	Sun Mar  6 19:51:32 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpfs.c,v 1.139 2016/03/06 19:47:41 christos Exp $	*/
+/*	$NetBSD: rumpfs.c,v 1.140 2016/03/07 00:51:32 christos Exp $	*/
 
 /*
  * Copyright (c) 2009, 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.139 2016/03/06 19:47:41 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.140 2016/03/07 00:51:32 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -934,7 +934,7 @@ rump_vop_setattr(void *v)
 
 		copylen = MIN(rn->rn_dlen, newlen);
 		memcpy(newdata, rn->rn_data, copylen);
-		memset(newdata + copylen, 0, newlen - copylen);
+		memset((char *)newdata + copylen, 0, newlen - copylen);
 
 		if ((rn->rn_flags & RUMPNODE_EXTSTORAGE) == 0) {
 			rump_hyperfree(rn->rn_data, rn->rn_dlen);

Reply via email to