Module Name:    src
Committed By:   christos
Date:           Wed Sep 17 23:54:42 UTC 2014

Modified Files:
        src/lib/libutil: getdiskrawname.c

Log Message:
KNF, sign cast.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/libutil/getdiskrawname.c

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

Modified files:

Index: src/lib/libutil/getdiskrawname.c
diff -u src/lib/libutil/getdiskrawname.c:1.4 src/lib/libutil/getdiskrawname.c:1.5
--- src/lib/libutil/getdiskrawname.c:1.4	Fri Sep 12 07:38:23 2014
+++ src/lib/libutil/getdiskrawname.c	Wed Sep 17 19:54:42 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: getdiskrawname.c,v 1.4 2014/09/12 11:38:23 mlelstv Exp $	*/
+/*	$NetBSD: getdiskrawname.c,v 1.5 2014/09/17 23:54:42 christos Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: getdiskrawname.c,v 1.4 2014/09/12 11:38:23 mlelstv Exp $");
+__RCSID("$NetBSD: getdiskrawname.c,v 1.5 2014/09/17 23:54:42 christos Exp $");
 
 #include <sys/stat.h>
 
@@ -47,7 +47,7 @@ resolve_link(char *buf, size_t bufsiz, c
 	size_t nlen;
 	ssize_t dlen;
 
-	dlen = readlink(name, buf, bufsiz-1);
+	dlen = readlink(name, buf, bufsiz - 1);
 	if (dlen == -1)
 		return name;
 
@@ -62,7 +62,7 @@ resolve_link(char *buf, size_t bufsiz, c
 			if (nlen + dlen + 1 > bufsiz)
 				return NULL;
 
-			memmove(buf+nlen, buf, dlen+1);
+			memmove(buf + nlen, buf, (size_t)dlen + 1);
 			memcpy(buf, name, nlen);
 		}
 	}

Reply via email to