Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/stdio Change last commit to Use "ptrdiff_t" instead...
details: https://anonhg.NetBSD.org/src/rev/18e8f577b6a6
branches: trunk
changeset: 757826:18e8f577b6a6
user: tron <tron%NetBSD.org@localhost>
date: Sat Sep 25 14:00:30 2010 +0000
description:
Change last commit to Use "ptrdiff_t" instead of "intptr_t" because the
former is more appropriate in this case.
diffstat:
lib/libc/stdio/fmemopen.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (33 lines):
diff -r b544d522b151 -r 18e8f577b6a6 lib/libc/stdio/fmemopen.c
--- a/lib/libc/stdio/fmemopen.c Sat Sep 25 13:45:11 2010 +0000
+++ b/lib/libc/stdio/fmemopen.c Sat Sep 25 14:00:30 2010 +0000
@@ -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:
Home |
Main Index |
Thread Index |
Old Index