projects
/
monky
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
39071d2
)
Fix if_existing
author
Alexander Graf
<agraf@znc.in>
Sat, 30 May 2009 20:20:16 +0000
(22:20 +0200)
committer
Brenden Matthews
<brenden@rty.ca>
Sat, 30 May 2009 22:21:42 +0000
(16:21 -0600)
The if_existing with 2 arguments checking whether a file contains a specified
string did not work. This is fixed by this patch.
Signed-off-by: Brenden Matthews <brenden@rty.ca>
src/conky.c
patch
|
blob
|
history
diff --git
a/src/conky.c
b/src/conky.c
index
7bb31db
..
30885c0
100644
(file)
--- a/
src/conky.c
+++ b/
src/conky.c
@@
-412,11
+412,10
@@
int check_contains(char *f, char *s)
FILE *where = open_file(f, 0);
if (where) {
- char buf1[256], buf2[256];
+ char buf1[256];
while (fgets(buf1, 256, where)) {
- sscanf(buf1, "%255s", buf2);
- if (strstr(buf2, s)) {
+ if (strstr(buf1, s)) {
ret = 1;
break;
}