mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-18 11:05:18 +00:00
fix for unused results in tailhead.c
This commit is contained in:
parent
1ff3f84068
commit
e99118cf2e
@ -140,7 +140,8 @@ static void print_tailhead(const char* type, struct text_object *obj, char *p, i
|
||||
if(fd != -1) {
|
||||
if(strcmp(type, "head") == 0) {
|
||||
for(i = 0; linescounted < ht->wantedlines; i++) {
|
||||
read(fd, p + i, 1);
|
||||
if (read(fd, p + i, 1) <= 0)
|
||||
break;
|
||||
if(p[i] == '\n') {
|
||||
linescounted++;
|
||||
}
|
||||
@ -159,7 +160,8 @@ static void print_tailhead(const char* type, struct text_object *obj, char *p, i
|
||||
if(fp != NULL) {
|
||||
if(strcmp(type, "head") == 0) {
|
||||
for(i = 0; i < ht->wantedlines; i++) {
|
||||
fgets(p + endofstring, p_max_size - endofstring, fp);
|
||||
if (!fgets(p + endofstring, p_max_size - endofstring, fp))
|
||||
break;
|
||||
endofstring = strlen(p);
|
||||
}
|
||||
} else if(strcmp(type, "tail") == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user