]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/vdr-2.4-gcc-11.patch
vdr: Fix build with GCC 11
[people/pmueller/ipfire-2.x.git] / src / patches / vdr-2.4-gcc-11.patch
1 From 46b480c798c2d5f4acb8874f25e5129f2cf7f224 Mon Sep 17 00:00:00 2001
2 From: Klaus Schmidinger <vdr@tvdr.de>
3 Date: Wed, 16 Sep 2020 13:30:59 +0200
4 Subject: [PATCH] Fixed checking the return value of the Open() call in
5 cFileName::SetOffset()
6
7 diff --git a/recording.c b/recording.c
8 index 810ef80..1fc34cd 100644
9 --- a/recording.c
10 +++ b/recording.c
11 @@ -3025,8 +3025,8 @@ cUnbufferedFile *cFileName::SetOffset(int Number, off_t Offset)
12 }
13 // found a non existing file suffix
14 }
15 - if (Open() >= 0) {
16 - if (!record && Offset >= 0 && file && file->Seek(Offset, SEEK_SET) != Offset) {
17 + if (Open()) {
18 + if (!record && Offset >= 0 && file->Seek(Offset, SEEK_SET) != Offset) {
19 LOG_ERROR_STR(fileName);
20 return NULL;
21 }
22 --
23 2.26.2
24