From 10090d2687c1f0ee2555ce0436e1c56671c33d70 Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Mon, 25 Dec 2023 17:13:19 +0100 Subject: Reformatted file_wplayer() --- FICS/utils.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'FICS') diff --git a/FICS/utils.c b/FICS/utils.c index f335ab5..97887c3 100644 --- a/FICS/utils.c +++ b/FICS/utils.c @@ -778,16 +778,18 @@ PUBLIC int file_has_pname(char *fname, char *plogin) return 0; } -PUBLIC char *file_wplayer(char *fname) -{ - static char tmp[MAX_FILENAME_SIZE]; - char *ptr; - strcpy(tmp, fname); - ptr = rindex(tmp, '-'); - if (!ptr) - return ""; - *ptr = '\0'; - return tmp; +PUBLIC char * +file_wplayer(char *fname) +{ + char *ptr; + static char tmp[MAX_FILENAME_SIZE]; + + strcpy(tmp, fname); + + if ((ptr = rindex(tmp, '-')) == NULL) + return ""; + *ptr = '\0'; + return tmp; } PUBLIC char * -- cgit v1.2.3