kernel/vfs: Fix -Werror=maybe-uninitialized.
This commit is contained in:
@@ -9554,7 +9554,7 @@ _user_read_stat(int fd, const char* userPath, bool traverseLink,
|
|||||||
struct stat* userStat, size_t statSize)
|
struct stat* userStat, size_t statSize)
|
||||||
{
|
{
|
||||||
struct stat stat;
|
struct stat stat;
|
||||||
status_t status;
|
status_t status = B_OK;
|
||||||
|
|
||||||
if (statSize > sizeof(struct stat))
|
if (statSize > sizeof(struct stat))
|
||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
@@ -9617,7 +9617,7 @@ _user_write_stat(int fd, const char* userPath, bool traverseLeafLink,
|
|||||||
if (statSize < sizeof(struct stat))
|
if (statSize < sizeof(struct stat))
|
||||||
memset((uint8*)&stat + statSize, 0, sizeof(struct stat) - statSize);
|
memset((uint8*)&stat + statSize, 0, sizeof(struct stat) - statSize);
|
||||||
|
|
||||||
status_t status;
|
status_t status = B_OK;
|
||||||
|
|
||||||
if (userPath != NULL) {
|
if (userPath != NULL) {
|
||||||
// path given: write the stat of the node referred to by (fd, path)
|
// path given: write the stat of the node referred to by (fd, path)
|
||||||
|
|||||||
Reference in New Issue
Block a user