]> jspc29.x-matter.uni-frankfurt.de Git - daqdata.git/commitdiff
Aesthetics -- mm
authorhadaq <hadaq>
Sun, 27 Oct 2002 09:11:14 +0000 (09:11 +0000)
committerhadaq <hadaq>
Sun, 27 Oct 2002 09:11:14 +0000 (09:11 +0000)
hadaq/hwrich.c
hadaq/hwshow.c

index dd2eed1d2c500ca2b6b60c4f3fdc7e1109c54dc7..b124bcef7168050890c761b4ef95b53b312cc92d 100644 (file)
@@ -1,4 +1,4 @@
-static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/Attic/hwrich.c,v 6.32 2002-10-25 09:27:20 hadaq Exp $";
+static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/Attic/hwrich.c,v 6.33 2002-10-27 09:11:14 hadaq Exp $";
 
 #define _POSIX_C_SOURCE 199309L
 #include <unistd.h>
@@ -64,10 +64,10 @@ Hardware *newHardware(const char *subsystem)
        }
        my = malloc(sizeof(Hardware));
        my->race = malloc(nCards * sizeof(HwRace *));
-
-       my->maxSubEvtSize = SubEvt_hdrSize() + (nCards * 2500 * sizeof(uint32_t));
        my->nRaces = nCards;
 
+       my->maxSubEvtSize = SubEvt_hdrSize() + (my->nRaces * 2500 * sizeof(uint32_t));
+
        for (i = 0; i < my->nRaces; i++) {
                my->race[i] = malloc(sizeof(HwRace));
                if (0 > conHwRace(my->race[i], cards[i], param)) {
index 8bcae97e0d183f3642f899b9e7e8cb204a053f88..677bc0c9e62e58e35636323e96954dfb0534abb9 100644 (file)
@@ -1,4 +1,4 @@
-static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/Attic/hwshow.c,v 6.29 2002-10-27 08:53:27 hadaq Exp $";
+static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/Attic/hwshow.c,v 6.30 2002-10-27 09:11:14 hadaq Exp $";
 
 #define _POSIX_C_SOURCE 199309L
 #include <unistd.h>
@@ -64,12 +64,12 @@ Hardware *newHardware(const char *subsystem)
        }
        my = malloc(sizeof(Hardware));
        my->ship = malloc(nCards * sizeof(HwShip *));
+       my->nShips = nCards;
 
 #if 0
-       my->maxSubEvtSize = SubEvt_hdrSize() + (nCards * 1600 * sizeof(uint32_t));
+       my->maxSubEvtSize = SubEvt_hdrSize() + (my->nShips * 1600 * sizeof(uint32_t));
 #endif
-       my->maxSubEvtSize = SubEvt_hdrSize() + (nCards * 1900 * sizeof(uint32_t));
-       my->nShips = nCards;
+       my->maxSubEvtSize = SubEvt_hdrSize() + (my->nShips * 1900 * sizeof(uint32_t));
 
        for (i = 0; i < my->nShips; i++) {
                my->ship[i] = malloc(sizeof(HwShip));