提交 0581c37b 创建 作者: Dan Cross's avatar Dan Cross 提交者: Frans Kaashoek

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: 's avatarDan Cross <cross@gajendra.net>
上级 b818915f
......@@ -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)
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论