Module Name:    src
Committed By:   tron
Date:           Sat Sep 25 13:45:11 UTC 2010

Modified Files:
        src/lib/libc/stdio: fmemopen.c

Log Message:
Add explicit cast to fix lint error on 32bit platforms.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/stdio/fmemopen.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/libc/stdio/fmemopen.c
diff -u src/lib/libc/stdio/fmemopen.c:1.1 src/lib/libc/stdio/fmemopen.c:1.2
--- src/lib/libc/stdio/fmemopen.c:1.1	Fri Sep 24 09:21:53 2010
+++ src/lib/libc/stdio/fmemopen.c	Sat Sep 25 13:45:11 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: fmemopen.c,v 1.1 2010/09/24 09:21:53 tnozaki Exp $ */
+/* $NetBSD: fmemopen.c,v 1.2 2010/09/25 13:45:11 tron Exp $ */
 
 /*-
  * Copyright (c)2007, 2010 Takehiko NOZAKI,
@@ -29,7 +29,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: fmemopen.c,v 1.1 2010/09/24 09:21:53 tnozaki Exp $");
+__RCSID("$NetBSD: fmemopen.c,v 1.2 2010/09/25 13:45:11 tron Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include <assert.h>
@@ -116,7 +116,7 @@
 		goto error;
 	}
 	if (offset >= (fpos_t)0 && offset <= p->tail - p->head) {
-		p->cur = p->head + offset;
+		p->cur = p->head + (intptr_t)offset;
 		return (fpos_t)(p->cur - p->head);
 	}
 error:

Reply via email to