summaryrefslogtreecommitdiffstats
path: root/print-resp.c
diff options
context:
space:
mode:
Diffstat (limited to 'print-resp.c')
-rw-r--r--print-resp.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/print-resp.c b/print-resp.c
index 37a386e..8f0a538 100644
--- a/print-resp.c
+++ b/print-resp.c
@@ -29,9 +29,7 @@
/* \summary: REdis Serialization Protocol (RESP) printer */
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
#include "netdissect-stdinc.h"
#include "netdissect.h"
@@ -306,7 +304,7 @@ resp_print_string_error_integer(netdissect_options *ndo, const u_char *bp, int l
* preceding the \r\n. That includes the opcode, so don't print
* that.
*/
- len = ND_BYTES_BETWEEN(bp_ptr, bp);
+ len = ND_BYTES_BETWEEN(bp, bp_ptr);
RESP_PRINT_SEGMENT(ndo, bp, len);
ret_len = 1 /*<opcode>*/ + len /*<string>*/ + 2 /*<CRLF>*/;
@@ -431,7 +429,7 @@ resp_print_inline(netdissect_options *ndo, const u_char *bp, int length) {
* Found it; bp_ptr points to the \r or \n, so bp_ptr - bp is the
* Length of the line text that precedes it. Print it.
*/
- len = ND_BYTES_BETWEEN(bp_ptr, bp);
+ len = ND_BYTES_BETWEEN(bp, bp_ptr);
RESP_PRINT_SEGMENT(ndo, bp, len);
/*