snabb icon indicating copy to clipboard operation
snabb copied to clipboard

pcap: variable not declared

Open evintila opened this issue 6 years ago • 1 comments

in "src/lib/pcap/pcap.lua", function "read_file_header" uses the variable "filename" (in case of magic number mismatch) which is not declared in that scope.

evintila avatar Dec 16 '18 12:12 evintila

Right, the solution is to either rename argument file to filename or either rename the instances of filename to file. I think the latter is preferred to match the naming convention of write_file_header.

https://github.com/snabbco/snabb/blob/master/src/lib/pcap/pcap.lua#L55

If you send a patch with those changes it will get merged very likely.

dpino avatar Dec 19 '18 09:12 dpino