diff options
| author | David M. Syzdek <david@syzdek.net> | 2010-01-09 11:09:34 -0900 |
|---|---|---|
| committer | David M. Syzdek <david@syzdek.net> | 2010-01-09 11:09:34 -0900 |
| commit | 30622fc92dffcc87fa912737783e010d8a380485 (patch) | |
| tree | f421c8d3a6cfa98ff23a0120a7ad867c4a5462d7 /src/bindump.c | |
| parent | 465d29dd6ae0cdac047d127faa62bc747b767eb3 (diff) | |
| download | dmstools-30622fc92dffcc87fa912737783e010d8a380485.tar.gz dmstools-30622fc92dffcc87fa912737783e010d8a380485.tar.bz2 dmstools-30622fc92dffcc87fa912737783e010d8a380485.tar.xz dmstools-30622fc92dffcc87fa912737783e010d8a380485.zip | |
Simplifying how len is sent to the print functions
Passing the unmodified length rather than the
adjusted length to the print statements since
the print statements calculate how many bytes to
display by using the "read" struct member instead
of the offset and "pos" struct memeber.
Diffstat (limited to 'src/bindump.c')
| -rw-r--r-- | src/bindump.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bindump.c b/src/bindump.c index cc665db..6601014 100644 --- a/src/bindump.c +++ b/src/bindump.c | |||
| @@ -349,9 +349,9 @@ int main(int argc, char * argv[]) | |||
| 349 | if ((my_read(&file2, 0, len, verbose) == -1)) | 349 | if ((my_read(&file2, 0, len, verbose) == -1)) |
| 350 | return(my_close(&file1, verbose)); | 350 | return(my_close(&file1, verbose)); |
| 351 | if (file2.filename) | 351 | if (file2.filename) |
| 352 | line += my_print_diff(&file1, &file2, 0, (len - (file1.pos-offset)), 0); | 352 | line += my_print_diff(&file1, &file2, 0, len, 0); |
| 353 | else | 353 | else |
| 354 | line += my_print_dump(&file1, 0, (len - (file1.pos-offset)), 0); | 354 | line += my_print_dump(&file1, 0, len, 0); |
| 355 | if (!(line % 22)) | 355 | if (!(line % 22)) |
| 356 | { | 356 | { |
| 357 | if (file2.filename) | 357 | if (file2.filename) |
