mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-02-04 21:18:33 +00:00
minor simplification of get_string_width_special()
This commit is contained in:
parent
4840de39cd
commit
15e262a3ca
10
src/conky.c
10
src/conky.c
@ -3330,13 +3330,11 @@ static int get_string_width_special(char *s, int special_index)
|
||||
int width = 0;
|
||||
long i;
|
||||
|
||||
if ((output_methods & TO_X) == 0) {
|
||||
return (s) ? strlen(s) : 0;
|
||||
}
|
||||
|
||||
if (!s) {
|
||||
if (!s)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ((output_methods & TO_X) == 0)
|
||||
return strlen(s);
|
||||
|
||||
p = strndup(s, text_buffer_size);
|
||||
final = p;
|
||||
|
Loading…
x
Reference in New Issue
Block a user