diff options
Diffstat (limited to 'src/libvmon/vmon.c')
-rw-r--r-- | src/libvmon/vmon.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/src/libvmon/vmon.c b/src/libvmon/vmon.c index ec33b2d..a8e2121 100644 --- a/src/libvmon/vmon.c +++ b/src/libvmon/vmon.c @@ -145,12 +145,6 @@ static int load_contents_fd(vmon_t *vmon, vmon_char_array_t *array, int fd, vmon memcmpcpy(&array->array[total], vmon->buf, len, changed, changed_pos); total += len; - - /* assume short read found EOF */ - if (len < sizeof(vmon->buf)) { - len = 0; - break; - } } /* if we read something or didn't encounter an error, store the new total */ @@ -356,10 +350,6 @@ static sample_ret_t proc_sample_stat(vmon_t *vmon, vmon_proc_t *proc, vmon_proc_ goto _out; /* this saves us the EOF read syscall */ } } - - /* assume short read found EOF */ - if (len < sizeof(vmon->buf)) - break; } _out: @@ -449,10 +439,6 @@ static int proc_follow_children(vmon_t *vmon, vmon_proc_t *proc, vmon_proc_follo assert(0); } } - - /* assume short read found EOF */ - if (len < sizeof(vmon->buf)) - break; } /* look for children which seem to no longer exist (found by stale generation numbers) and queue them for unmonitoring, flag this as a children change too */ @@ -815,10 +801,6 @@ static sample_ret_t proc_sample_vm(vmon_t *vmon, vmon_proc_t *proc, vmon_proc_vm goto _out; /* this saves us the EOF read syscall */ } } - - /* assume short read found EOF */ - if (len < sizeof(vmon->buf)) - break; } _out: @@ -876,10 +858,6 @@ static sample_ret_t proc_sample_io(vmon_t *vmon, vmon_proc_t *proc, vmon_proc_io goto _out; /* this saves us the EOF read syscall */ } } - - /* assume short read found EOF */ - if (len < sizeof(vmon->buf)) - break; } _out: @@ -943,10 +921,6 @@ static sample_ret_t sys_sample_stat(vmon_t *vmon, vmon_sys_stat_t **store) goto _out; /* this saves us the EOF read syscall */ } } - - /* assume short read found EOF */ - if (len < sizeof(vmon->buf)) - break; } _out: @@ -997,10 +971,6 @@ static sample_ret_t sys_sample_vm(vmon_t *vmon, vmon_sys_vm_t **store) goto _out; /* this saves us the EOF read syscall */ } } - - /* assume short read found EOF */ - if (len < sizeof(vmon->buf)) - break; } _out: |