Changeset 386e276 in mainline
- Timestamp:
- 2009-05-06T20:57:09Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 66b430e
- Parents:
- 8bb129d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/vfs/vfs_file.c
r8bb129d r386e276 104 104 int vfs_fd_free(int fd) 105 105 { 106 if ((fd >= MAX_OPEN_FILES) || (files[fd] == NULL))106 if ((fd < 0) || (fd >= MAX_OPEN_FILES) || (files[fd] == NULL)) 107 107 return EBADF; 108 108 vfs_file_delref(files[fd]); … … 151 151 vfs_file_t *vfs_file_get(int fd) 152 152 { 153 if ( fd < MAX_OPEN_FILES)153 if ((fd >= 0) && (fd < MAX_OPEN_FILES)) 154 154 return files[fd]; 155 155 return NULL;
Note:
See TracChangeset
for help on using the changeset viewer.