summaryrefslogtreecommitdiff
path: root/nuttx/libc/misc/lib_ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/libc/misc/lib_ioctl.c')
-rw-r--r--nuttx/libc/misc/lib_ioctl.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/nuttx/libc/misc/lib_ioctl.c b/nuttx/libc/misc/lib_ioctl.c
index 9ef09fcd9..65932c12d 100644
--- a/nuttx/libc/misc/lib_ioctl.c
+++ b/nuttx/libc/misc/lib_ioctl.c
@@ -87,10 +87,14 @@ int ioctl(int fd, int req, ...)
va_list ap;
unsigned long arg;
- /* Get the unsigned long argument */
+ /* Get the unsigned long argument.
+ *
+ * REVISIT: This could cause of the crash down the road if the actual size
+ * of the argument is anything other than sizeof(unsigned long);
+ */
va_start(ap, req);
- arg = va_arg(ap, unsigned long );
+ arg = va_arg(ap, unsigned long);
va_end(ap);
/* Then let fs_ioctl() to the real work */