diff options
-rw-r--r-- | cmd/cmd_dump.c | 2 | ||||
-rw-r--r-- | cmd/cmd_dumpx.c | 4 | ||||
-rw-r--r-- | libbuf/buf.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/cmd/cmd_dump.c b/cmd/cmd_dump.c index 999822e..1f6ac41 100644 --- a/cmd/cmd_dump.c +++ b/cmd/cmd_dump.c @@ -18,7 +18,7 @@ int c_dump( cmd_arg_t *arg ) return -1; } - for (i=0; i<g_buf->size(); i++) + for (i=0; i<g_buf->cursize(); i++) { char c; g_buf->getc(i,&c); diff --git a/cmd/cmd_dumpx.c b/cmd/cmd_dumpx.c index ecca20c..452010f 100644 --- a/cmd/cmd_dumpx.c +++ b/cmd/cmd_dumpx.c @@ -21,11 +21,11 @@ int c_dumpx( cmd_arg_t *arg ) return -1; } - for (i=0; i<g_buf->size(); i+=16) + for (i=0; i<g_buf->cursize(); i+=16) { for (j=i; j<i+16; j++) { - if ( j<g_buf->size() ) + if ( j<g_buf->cursize() ) { char c; g_buf->getc(j,&c); diff --git a/libbuf/buf.c b/libbuf/buf.c index 83457e9..b62eb13 100644 --- a/libbuf/buf.c +++ b/libbuf/buf.c @@ -514,7 +514,7 @@ bool Buf::isempty() return true; if (this->buf_size <= 0) return true; - return true; + return false; } int Buf::empty() |