Module Name: src Committed By: tron Date: Sat Sep 25 14:00:30 UTC 2010
Modified Files: src/lib/libc/stdio: fmemopen.c Log Message: Change last commit to Use "ptrdiff_t" instead of "intptr_t" because the former is more appropriate in this case. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 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.2 src/lib/libc/stdio/fmemopen.c:1.3 --- src/lib/libc/stdio/fmemopen.c:1.2 Sat Sep 25 13:45:11 2010 +++ src/lib/libc/stdio/fmemopen.c Sat Sep 25 14:00:30 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: fmemopen.c,v 1.2 2010/09/25 13:45:11 tron Exp $ */ +/* $NetBSD: fmemopen.c,v 1.3 2010/09/25 14:00:30 tron Exp $ */ /*- * Copyright (c)2007, 2010 Takehiko NOZAKI, @@ -29,12 +29,13 @@ #include <sys/cdefs.h> #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fmemopen.c,v 1.2 2010/09/25 13:45:11 tron Exp $"); +__RCSID("$NetBSD: fmemopen.c,v 1.3 2010/09/25 14:00:30 tron Exp $"); #endif /* LIBC_SCCS and not lint */ #include <assert.h> #include <errno.h> #include <fcntl.h> +#include <stddef.h> #include <stdio.h> #include <stdlib.h> @@ -116,7 +117,7 @@ goto error; } if (offset >= (fpos_t)0 && offset <= p->tail - p->head) { - p->cur = p->head + (intptr_t)offset; + p->cur = p->head + (ptrdiff_t)offset; return (fpos_t)(p->cur - p->head); } error: