fdtable: fdtable: do not use tag name fd_entry
Do not reuse tag name (misra rule 5.7). Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
c59cf6008b
commit
0ac3073d20
1 changed files with 8 additions and 8 deletions
|
@ -120,34 +120,34 @@ static int _check_fd(int fd)
|
||||||
|
|
||||||
void *z_get_fd_obj(int fd, const struct fd_op_vtable *vtable, int err)
|
void *z_get_fd_obj(int fd, const struct fd_op_vtable *vtable, int err)
|
||||||
{
|
{
|
||||||
struct fd_entry *fd_entry;
|
struct fd_entry *entry;
|
||||||
|
|
||||||
if (_check_fd(fd) < 0) {
|
if (_check_fd(fd) < 0) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
fd_entry = &fdtable[fd];
|
entry = &fdtable[fd];
|
||||||
|
|
||||||
if (vtable != NULL && fd_entry->vtable != vtable) {
|
if (vtable != NULL && entry->vtable != vtable) {
|
||||||
errno = err;
|
errno = err;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return fd_entry->obj;
|
return entry->obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *z_get_fd_obj_and_vtable(int fd, const struct fd_op_vtable **vtable)
|
void *z_get_fd_obj_and_vtable(int fd, const struct fd_op_vtable **vtable)
|
||||||
{
|
{
|
||||||
struct fd_entry *fd_entry;
|
struct fd_entry *entry;
|
||||||
|
|
||||||
if (_check_fd(fd) < 0) {
|
if (_check_fd(fd) < 0) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
fd_entry = &fdtable[fd];
|
entry = &fdtable[fd];
|
||||||
*vtable = fd_entry->vtable;
|
*vtable = entry->vtable;
|
||||||
|
|
||||||
return fd_entry->obj;
|
return entry->obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
int z_reserve_fd(void)
|
int z_reserve_fd(void)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue