net/vfcntl: fix nxstyle warning

Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
chao.an 2020-06-24 17:54:18 +08:00 committed by Abdelatif Guettouche
parent f56e0e004b
commit d6a0da41d5
1 changed files with 13 additions and 10 deletions

View File

@ -86,7 +86,9 @@ int psock_vfcntl(FAR struct socket *psock, int cmd, va_list ap)
return -EBADF; return -EBADF;
} }
/* Interrupts must be disabled in order to perform operations on socket structures */ /* Interrupts must be disabled in order to perform operations on socket
* structures
*/
net_lock(); net_lock();
switch (cmd) switch (cmd)
@ -97,9 +99,9 @@ int psock_vfcntl(FAR struct socket *psock, int cmd, va_list ap)
* or equal to the third argument, arg, taken as an integer of type * or equal to the third argument, arg, taken as an integer of type
* int. The new file descriptor shall refer to the same open file * int. The new file descriptor shall refer to the same open file
* description as the original file descriptor, and shall share any * description as the original file descriptor, and shall share any
* locks. The FD_CLOEXEC flag associated with the new file descriptor * locks. The FD_CLOEXEC flag associated with the new file
* shall be cleared to keep the file open across calls to one of the * descriptor shall be cleared to keep the file open across calls
* exec functions. * to one of the exec functions.
*/ */
{ {
@ -185,12 +187,13 @@ int psock_vfcntl(FAR struct socket *psock, int cmd, va_list ap)
break; break;
case F_SETFL: case F_SETFL:
/* Set the file status flags, defined in <fcntl.h>, for the file description /* Set the file status flags, defined in <fcntl.h>, for the file
* associated with fd from the corresponding bits in the third argument, * description associated with fd from the corresponding bits in
* arg, taken as type int. Bits corresponding to the file access mode and * the third argument, arg, taken as type int. Bits corresponding
* the file creation flags, as defined in <fcntl.h>, that are set in arg * to the file access mode and the file creation flags, as defined
* will be ignored. If any bits in arg other than those mentioned here are * in <fcntl.h>, that are set in arg will be ignored. If any bits
* changed by the application, the result is unspecified. * in arg other than those mentioned here are changed by the
* application, the result is unspecified.
*/ */
{ {