summaryrefslogtreecommitdiff
path: root/libdiskfs
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1996-01-31 05:26:59 +0000
committerRoland McGrath <roland@gnu.org>1996-01-31 05:26:59 +0000
commit83e23f328715aa992d488efba71f9c0c887ac12b (patch)
tree706594225cc1971889f3f59daa3d2c5f869cd98b /libdiskfs
parent46c03b06ce67a7b254db683e45f70e6f7b15e301 (diff)
(diskfs_node_rdwr): Handle null AMTREAD.
Diffstat (limited to 'libdiskfs')
-rw-r--r--libdiskfs/node-rdwr.c5
1 files changed, 4 insertions, 1 deletions
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)
{