Skip to content

Commit

Permalink
remove magic number
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmelt committed May 15, 2018
1 parent 7571c3d commit ba43cb8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/cosmos/dart/lib/dart_database_cleaner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
# attribution addendums as found in the LICENSE.txt

require 'dart_common'
require 'cosmos/packet_logs/packet_log_reader'

class DartDatabaseCleaner
include DartCommon
Expand Down Expand Up @@ -50,7 +51,7 @@ def remove_packet_log(filename)
start_time = first_packet.received_time
end_time = last_packet.received_time
rescue
if size == 128 or size == 0
if size == Cosmos::PacketLogReader::COSMOS2_HEADER_LENGTH or size == 0
Cosmos::Logger::error("File contains no packets: #{filename}")
else
Cosmos::Logger::error("Error analyzing file: #{filename}")
Expand Down

0 comments on commit ba43cb8

Please sign in to comment.