Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16784 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
e6a6424e1c
commit
33dd85501f
@ -6565,15 +6565,11 @@ _user_open_entry_ref(dev_t device, ino_t inode, const char *userName,
|
||||
int openMode, int perms)
|
||||
{
|
||||
char name[B_FILE_NAME_LENGTH];
|
||||
int status;
|
||||
|
||||
if (!IS_USER_ADDRESS(userName))
|
||||
if (!IS_USER_ADDRESS(userName)
|
||||
|| user_strlcpy(name, userName, sizeof(name)) < B_OK)
|
||||
return B_BAD_ADDRESS;
|
||||
|
||||
status = user_strlcpy(name, userName, sizeof(name));
|
||||
if (status < B_OK)
|
||||
return status;
|
||||
|
||||
if (openMode & O_CREAT)
|
||||
return file_create_entry_ref(device, inode, name, openMode, perms, false);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user