Minor: Avoid null else branch
authorAdrian-Ken Rueegsegger <ken@codelabs.ch>
Wed, 10 May 2017 12:07:51 +0000 (14:07 +0200)
committerAdrian-Ken Rueegsegger <ken@codelabs.ch>
Wed, 17 May 2017 13:27:28 +0000 (15:27 +0200)
Use conditional pragma Debug to avoid an else branch which is only
necessary for debug output.

Signed-off-by: Adrian-Ken Rueegsegger <ken@codelabs.ch>
src/hw-dbc.adb

index b711b711c3068c2fcc9f2eadcdb22544bc5d5fda..5c5709a54eed55c8314d06df29c0e6a3a05f6999 100644 (file)
@@ -256,6 +256,9 @@ is
          Find_Next_xCap (10, Success);
       end if;
 
+      pragma Debug (not Success, Debug.Put_Line
+                    ("ERROR: Couldn't find xHCI debug capability."));
+
       if Success then
          Regs.Byte_Offset := xCap_Regs.Byte_Offset;
 
@@ -272,10 +275,6 @@ is
          String_To_Desc (Desc_Strings (Serial_Number), "1");
 
          Reset (Initial_Reset => True);
-      else
-         null;
-         pragma Debug (Debug.Put_Line
-           ("ERROR: Couldn't find xHCI debug capability."));
       end if;
    end Init;