1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-15 17:47:09 +00:00

fix for unused results in tailhead.c

This commit is contained in:
Phil Sutter 2009-12-27 03:42:31 +01:00
parent 1ff3f84068
commit e99118cf2e

View File

@ -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) {