[tyndur-devel] [PATCH 2/9] 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 a1644ed..e7d7ff4 100644 --- a/src/modules/c/shell/cmds/pipe.c +++ b/src/modules/c/shell/cmds/pipe.c @@ -92,7 +92,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