rxevent: fix mismatched #endif 06/15106/2
authorBenjamin Kaduk <kaduk@mit.edu>
Tue, 16 Aug 2022 14:48:02 +0000 (07:48 -0700)
committerBenjamin Kaduk <kaduk@mit.edu>
Tue, 16 Aug 2022 15:43:04 +0000 (11:43 -0400)
We should only assign to 'ev' once, rather than assigning a second
time to an uninitialized value.

Reported by Ben Huntsman and diagnosed by Jeffrey Altman.

Change-Id: I63f50d46658e95ae570dc78dcfeffce973a9e7ed
Reviewed-on: https://gerrit.openafs.org/15106
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>

src/rx/rx_event.c

index 6638e5b..c3fb672 100644 (file)
@@ -126,8 +126,8 @@ rxevent_alloc(void) {
        mrec->next = freeEvents.mallocs;
        freeEvents.mallocs = mrec;
        MUTEX_EXIT(&freeEvents.lock);
-#endif
        ev = &evlist[0];
+#endif
     } else {
        ev = opr_queue_First(&freeEvents.list, struct rxevent, q);
        opr_queue_Remove(&ev->q);