Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/miscfs Change variable used for directory offset from "i...
details: https://anonhg.NetBSD.org/src/rev/1aabb1ccc231
branches: trunk
changeset: 475782:1aabb1ccc231
user: sommerfeld <sommerfeld%NetBSD.org@localhost>
date: Wed Aug 25 14:42:35 1999 +0000
description:
Change variable used for directory offset from "int" to "off_t".
Overkill, but avoids a host of truncation problems.
diffstat:
sys/miscfs/fdesc/fdesc_vnops.c | 6 +++---
sys/miscfs/kernfs/kernfs_vnops.c | 4 ++--
sys/miscfs/procfs/procfs_vnops.c | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
diffs (63 lines):
diff -r 008fd35be7d7 -r 1aabb1ccc231 sys/miscfs/fdesc/fdesc_vnops.c
--- a/sys/miscfs/fdesc/fdesc_vnops.c Wed Aug 25 12:56:38 1999 +0000
+++ b/sys/miscfs/fdesc/fdesc_vnops.c Wed Aug 25 14:42:35 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fdesc_vnops.c,v 1.52 1999/08/24 23:29:08 sommerfeld Exp $ */
+/* $NetBSD: fdesc_vnops.c,v 1.53 1999/08/25 14:42:35 sommerfeld Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -678,7 +678,7 @@
struct uio *uio = ap->a_uio;
struct dirent d;
struct filedesc *fdp;
- int i;
+ off_t i;
int error;
off_t *cookies = NULL;
int ncookies = 0;
@@ -773,7 +773,7 @@
if (fdp->fd_ofiles[i - 2] == NULL)
continue;
d.d_fileno = i - 2 + FD_STDIN;
- d.d_namlen = sprintf(d.d_name, "%d", i - 2);
+ d.d_namlen = sprintf(d.d_name, "%d", (int) i - 2);
d.d_type = DT_UNKNOWN;
break;
}
diff -r 008fd35be7d7 -r 1aabb1ccc231 sys/miscfs/kernfs/kernfs_vnops.c
--- a/sys/miscfs/kernfs/kernfs_vnops.c Wed Aug 25 12:56:38 1999 +0000
+++ b/sys/miscfs/kernfs/kernfs_vnops.c Wed Aug 25 14:42:35 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kernfs_vnops.c,v 1.66 1999/08/24 23:29:09 sommerfeld Exp $ */
+/* $NetBSD: kernfs_vnops.c,v 1.67 1999/08/25 14:42:35 sommerfeld Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -611,7 +611,7 @@
struct uio *uio = ap->a_uio;
struct dirent d;
struct kern_target *kt;
- int i;
+ off_t i;
int error;
off_t *cookies = NULL;
int ncookies = 0, nc = 0;
diff -r 008fd35be7d7 -r 1aabb1ccc231 sys/miscfs/procfs/procfs_vnops.c
--- a/sys/miscfs/procfs/procfs_vnops.c Wed Aug 25 12:56:38 1999 +0000
+++ b/sys/miscfs/procfs/procfs_vnops.c Wed Aug 25 14:42:35 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: procfs_vnops.c,v 1.67 1999/08/24 23:29:09 sommerfeld Exp $ */
+/* $NetBSD: procfs_vnops.c,v 1.68 1999/08/25 14:42:36 sommerfeld Exp $ */
/*
* Copyright (c) 1993 Jan-Simon Pendry
@@ -847,7 +847,7 @@
struct uio *uio = ap->a_uio;
struct dirent d;
struct pfsnode *pfs;
- int i;
+ off_t i;
int error;
off_t *cookies = NULL;
int ncookies;
Home |
Main Index |
Thread Index |
Old Index