]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2796] compare with a constant instead of a magic number
authorYoshitaka Aharen <aharen@jprs.co.jp>
Wed, 29 May 2013 04:48:44 +0000 (13:48 +0900)
committerYoshitaka Aharen <aharen@jprs.co.jp>
Wed, 29 May 2013 04:48:44 +0000 (13:48 +0900)
src/bin/auth/statistics.cc.pre

index 6caca00b2e138adb43a10aa0645fcc6f431b192d..ec39db6a4ae43866269615859f4e146e5fce7dd7 100644 (file)
@@ -142,7 +142,7 @@ Counters::incRequest(const MessageAttributes& msgattrs) {
         server_msg_counter_.inc(opcode_to_msgcounter[code]);
 
         // Opcode = 0: Query
-        if (code == 0) {
+        if (code == Opcode::QUERY_CODE) {
             // Recursion Desired bit
             if (msgattrs.requestHasRD()) {
                 server_msg_counter_.inc(MSG_QRYRECURSION);