]> git.proxmox.com Git - mirror_frr.git/commitdiff
lib: fix STREAM_GETF macro
authorEmanuele Di Pascale <emanuele@voltanet.io>
Mon, 22 Jun 2020 17:02:56 +0000 (19:02 +0200)
committerEmanuele Di Pascale <emanuele@voltanet.io>
Mon, 22 Jun 2020 17:04:06 +0000 (19:04 +0200)
a missing '!' operator was making any STREAM_GETF fail
when in fact it should have succeeded. As a consequence
of this, for example, many link-params of an interface
were not being read and populated.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
lib/stream.h

index 7cacf57d27613dcfb35010979f274bd9dda37ae0..245f35db512947eb199d25389b9a2a177872b183 100644 (file)
@@ -426,7 +426,7 @@ static inline const uint8_t *ptr_get_be32(const uint8_t *ptr, uint32_t *out)
                        float r;                                               \
                        uint32_t d;                                            \
                } _pval;                                                       \
-               if (stream_getl2((S), &_pval.d))                               \
+               if (!stream_getl2((S), &_pval.d))                              \
                        goto stream_failure;                                   \
                (P) = _pval.r;                                                 \
        } while (0)