[vlc-commits] [Git][videolan/vlc][master] modules: use STDERR_FILENO instead of the hardcoded value
Steve Lhomme (@robUx4)
gitlab at videolan.org
Tue Jun 14 07:37:02 UTC 2022
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
0e448365 by Steve Lhomme at 2022-06-14T06:48:56+00:00
modules: use STDERR_FILENO instead of the hardcoded value
It's the same value except it's more explicit.
- - - - -
3 changed files:
- modules/demux/ytdl.c
- modules/misc/inhibit/xdg.c
- modules/stream_filter/decomp.c
Changes:
=====================================
modules/demux/ytdl.c
=====================================
@@ -71,7 +71,7 @@ static int ytdl_popen(pid_t *restrict pid, const char *argv[])
if (vlc_pipe(fds))
return -1;
- int fdv[] = { -1, fds[1], 2, -1 };
+ int fdv[] = { -1, fds[1], STDERR_FILENO, -1 };
int val = vlc_spawn(pid, argv[0], fdv, argv);
vlc_close(fds[1]);
=====================================
modules/misc/inhibit/xdg.c
=====================================
@@ -41,7 +41,7 @@ vlc_module_end ()
static void Timer (void *data)
{
static const char *const argv[] = { "xdg-screensaver", "reset", NULL };
- static const int fdv[] = { -1, 2, 2, -1 };
+ static const int fdv[] = { -1, STDERR_FILENO, STDERR_FILENO, -1 };
vlc_inhibit_t *ih = data;
pid_t pid;
=====================================
modules/stream_filter/decomp.c
=====================================
@@ -268,7 +268,7 @@ static int Open (stream_t *stream, const char *path)
int uncomp[2];
if (vlc_pipe (uncomp) == 0)
{
- int fdv[] = { comp[0], uncomp[1], 2, -1 };
+ int fdv[] = { comp[0], uncomp[1], STDERR_FILENO, -1 };
const char *argv[] = { path, NULL };
p_sys->read_fd = uncomp[0];
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/0e448365f6bc41439fd88f05b2e648b1a3d8f3b0
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/0e448365f6bc41439fd88f05b2e648b1a3d8f3b0
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list