[tyndur-devel] [PATCH 1/2] shell: pipe braucht kein kaputtes fread mehr
Kevin Wolf ·
! shell: fread gibt mit LIOv2 die Anzahl der vollstaendig gelesenen Elemente zurueck, nicht die Anzahl Bytes Signed-off-by: Kevin Wolf <kevin at tyndur.org> --- src/modules/c/shell/cmds/pipe.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/modules/c/shell/cmds/pipe.c b/src/modules/c/shell/cmds/pipe.c index 2f2dfdd..a6b333e 100644 --- a/src/modules/c/shell/cmds/pipe.c +++ b/src/modules/c/shell/cmds/pipe.c @@ -91,7 +91,7 @@ void pipe_display_usage(void); while (no_eof || !feof(f)) { char buf[1024]; - size_t length = fread(buf, 1023, 1, f); + size_t length = fread(buf, 1, 1023, f); if (length > 0) { buf[length] = '\0'; printf("%s", buf); -- 1.6.0.2