summaryrefslogtreecommitdiff
path: root/recording.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2021-01-01 15:26:27 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2021-01-01 15:26:27 +0100
commit40ca081ff4e360c383a66c627df4c467c04e5913 (patch)
treeb2fe747fd8319176397ec4afb844f9631690f474 /recording.c
parentc46fd1ff5bbddbe7b66c6a362d493d4fcb338c10 (diff)
downloadvdr-40ca081ff4e360c383a66c627df4c467c04e5913.tar.gz
vdr-40ca081ff4e360c383a66c627df4c467c04e5913.tar.bz2
Using strgetlast() in more places
Diffstat (limited to 'recording.c')
-rw-r--r--recording.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/recording.c b/recording.c
index 17467e36..2e2ceefa 100644
--- a/recording.c
+++ b/recording.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: recording.c 5.1 2020/12/26 15:49:01 kls Exp $
+ * $Id: recording.c 5.2 2021/01/01 15:26:27 kls Exp $
*/
#include "recording.h"
@@ -1050,9 +1050,7 @@ cString cRecording::Folder(void) const
cString cRecording::BaseName(void) const
{
- if (char *s = strrchr(name, FOLDERDELIMCHAR))
- return cString(s + 1);
- return name;
+ return strgetlast(name, FOLDERDELIMCHAR);
}
const char *cRecording::FileName(void) const
@@ -1158,8 +1156,7 @@ int cRecording::HierarchyLevels(void) const
bool cRecording::IsEdited(void) const
{
- const char *s = strrchr(name, FOLDERDELIMCHAR);
- s = !s ? name : s + 1;
+ const char *s = strgetlast(name, FOLDERDELIMCHAR);
return *s == '%';
}