pud: remove a wrong performance optimisation
authorFerry Huberts <ferry.huberts@pelagic.nl>
Sun, 24 Nov 2019 10:06:45 +0000 (11:06 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Sun, 24 Nov 2019 10:18:27 +0000 (11:18 +0100)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/pud/wireformat/src/wireFormat.c

index 48846ee..c3ca53d 100644 (file)
@@ -802,7 +802,7 @@ void setPositionUpdateNodeId(
                PudOlsrPositionUpdate * olsrGpsMessage, unsigned char * nodeId,
                unsigned int nodeIdSize, bool padWithNullByte) {
        memcpy(&olsrGpsMessage->nodeInfo.nodeId, nodeId, nodeIdSize);
-       if (unlikely(padWithNullByte)) {
+       if (padWithNullByte) {
                (&olsrGpsMessage->nodeInfo.nodeId)[nodeIdSize] = '\0';
        }
 }