From 83e23f328715aa992d488efba71f9c0c887ac12b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 31 Jan 1996 05:26:59 +0000 Subject: (diskfs_node_rdwr): Handle null AMTREAD. --- libdiskfs/node-rdwr.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libdiskfs') diff --git a/libdiskfs/node-rdwr.c b/libdiskfs/node-rdwr.c index 888f2497..79c94f8d 100644 --- a/libdiskfs/node-rdwr.c +++ b/libdiskfs/node-rdwr.c @@ -58,7 +58,10 @@ diskfs_node_rdwr (struct node *np, amt = np->dn_stat.st_size - off; } - *amtread = amt; + if (amtread) + *amtread = amt; + else + amtread = &amt; err = _diskfs_rdwr_internal (np, data, off, amtread, dir, 0); if (*amtread && diskfs_synchronous) { -- cgit v1.2.3