projects
/
monky
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4840de3
)
minor simplification of get_string_width_special()
author
Phil Sutter
<phil@nwl.cc>
Sun, 20 Sep 2009 01:17:55 +0000
(
03:17
+0200)
committer
Phil Sutter
<phil@nwl.cc>
Sun, 20 Sep 2009 11:16:20 +0000
(13:16 +0200)
src/conky.c
patch
|
blob
|
history
diff --git
a/src/conky.c
b/src/conky.c
index
46ab31a
..
216afe6
100644
(file)
--- a/
src/conky.c
+++ b/
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;