]> Devi Nivas Git - cs3210-lab1.git/commitdiff
Removed unused `dirlookup` argument in `create`
authorDan Cross <cross@gajendra.net>
Thu, 21 Mar 2019 01:15:38 +0000 (01:15 +0000)
committerFrans Kaashoek <kaashoek@mit.edu>
Mon, 19 Aug 2019 17:22:35 +0000 (13:22 -0400)
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 <cross@gajendra.net>
sysfile.c

index 87e508b26805efa2cc789adf9b9742fc6aa625f0..bfe61b7d99e6e37242d5b8412deefef887525bc7 100644 (file)
--- a/sysfile.c
+++ b/sysfile.c
@@ -241,7 +241,6 @@ bad:
 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)