diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-11-28 19:50:43 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-12-03 19:20:47 +0200 |
commit | fcf98514cb4eb603a05329deec508fe790ba1c17 (patch) | |
tree | 74bb2ab6ac1f961bae91c6428b9e615f1555c96c /.clang-tidy | |
parent | 1d0dbc0da83968d9b2f21b9552151ca28fd392e5 (diff) |
libcamera: base: file_descriptor: Return UniqueFD from dup()
The dup() function returns a duplicate of the file descriptor. Wrapping
it in a FileDescriptor isn't wrong as such, but it prevents from using
it in contexts where a UniqueFD is needed. As the duplicate is
guaranteed to have a single owner when created, return it as a UniqueFD
instead. A FileDescriptor can easily be created from the UniqueFD if
desired.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to '.clang-tidy')
0 files changed, 0 insertions, 0 deletions