From 0581c37baf8950ae9602a1419498a800f9fade4f Mon Sep 17 00:00:00 2001 From: Dan Cross Date: Thu, 21 Mar 2019 01:15:38 +0000 Subject: [PATCH] Removed unused `dirlookup` argument in `create` The `off` argument to `dirlookup` is optional. It was not being used in the `dirlookup` call in `create`, so pass NULL instead and delete the unused local. Signed-off-by: Dan Cross --- sysfile.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sysfile.c b/sysfile.c index 87e508b268..bfe61b7d99 100644 --- a/sysfile.c +++ b/sysfile.c @@ -241,7 +241,6 @@ sys_unlink(void) static struct inode* create(char *path, short type, short major, short minor) { - uint off; struct inode *ip, *dp; char name[DIRSIZ]; @@ -249,7 +248,7 @@ create(char *path, short type, short major, short minor) return 0; ilock(dp); - if((ip = dirlookup(dp, name, &off)) != 0){ + if((ip = dirlookup(dp, name, 0)) != 0){ iunlockput(dp); ilock(ip); if(type == T_FILE && ip->type == T_FILE)