PUD: improve clearing the result in detemineMoving
authorFerry Huberts <f.huberts@mindef.nl>
Wed, 2 Nov 2011 11:36:21 +0000 (12:36 +0100)
committerFerry Huberts <f.huberts@mindef.nl>
Wed, 2 Nov 2011 11:38:00 +0000 (12:38 +0100)
Signed-off-by: Ferry Huberts <f.huberts@mindef.nl>
lib/pud/src/receiver.c

index d93fdb8..0d65118 100644 (file)
@@ -381,7 +381,17 @@ static void detemineMoving(PositionUpdateEntry * avg,
        bool vdopDistanceValid;
 
        /* clear outputs */
-       memset(result, UNKNOWN, sizeof(MovementType));
+       result->moving = UNKNOWN;
+       result->overThresholds = UNKNOWN;
+       result->speedOverThreshold = UNKNOWN;
+       result->hDistanceOverThreshold = UNKNOWN;
+       result->vDistanceOverThreshold = UNKNOWN;
+       result->outside = UNKNOWN;
+       result->outsideHdop = UNKNOWN;
+       result->outsideVdop = UNKNOWN;
+       result->inside = UNKNOWN;
+       result->insideHdop = UNKNOWN;
+       result->insideVdop = UNKNOWN;
 
        /*
         * Validity