]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fixing Coverity UNINIT defect
authorlaphecet <laphecet@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 28 Sep 2010 18:36:14 +0000 (18:36 +0000)
committerlaphecet <laphecet@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 28 Sep 2010 18:36:14 +0000 (18:36 +0000)
MUON/AliMUONMchViewApplication.cxx
MUON/mchview.cxx

index 93d1bd75f8b3b90992ecccfe264bc89081aa42c1..fc6e152a87dab0959d85b464d7b9b9f1f80d827b 100644 (file)
@@ -87,7 +87,7 @@ AliMUONMchViewApplication::AliMUONMchViewApplication(const char* name,
   /// (w,h) is the size in pixel (if 0,0 it will be computed as 70%,90% of display size)
   /// (ox,oy) is the offset from the top-left of the display
 
-  if (!w | !h)
+  if (!w || !h)
   {
     w = (UInt_t)(gClient->GetDisplayWidth()*0.7);
     h = (UInt_t)(gClient->GetDisplayHeight()*0.9); 
index 557d67e5453d8fa7fcd2ef05975a511bd45f34f4..ae032703e04ffa2b8d27ea3ab0ab30b7724c92e8 100644 (file)
@@ -71,8 +71,8 @@ int main(int argc, char** argv)
   
   TObjArray filesToOpen;
   Bool_t isGeometryFixed(kFALSE);
-  Int_t gix, giy;
-  Int_t gox,goy;
+  Int_t gix(0),giy(0);
+  Int_t gox(0),goy(0);
   Bool_t ASCIImapping(kFALSE);
   TString defaultOCDB("local://$ALICE_ROOT/OCDB");
   
@@ -162,20 +162,16 @@ int main(int argc, char** argv)
   gStyle->SetPalette(n+2,colors);
   delete[] colors;
 
-  UInt_t w(0);
-  UInt_t h(0);
-  UInt_t ox(0);
-  UInt_t oy(0);
+  AliMUONMchViewApplication* theApp(0x0);
 
   if ( isGeometryFixed )
   {
-    w = gix;
-    h = giy;
-    ox = gox;
-    oy = goy;
+    theApp = new AliMUONMchViewApplication("mchview", &argc, argv,gix,giy,gox,goy);
+  }
+  else
+  {
+    theApp = new AliMUONMchViewApplication("mchview",&argc,argv);
   }
-  
-  AliMUONMchViewApplication* theApp = new AliMUONMchViewApplication("mchview", &argc, argv, w,h,gox,goy);
    
   TIter next(&filesToOpen);
   TObjString* s;