diff options
| author | vivek <vivek@cumulusnetworks.com> | 2018-03-10 04:03:41 +0000 |
|---|---|---|
| committer | vivek <vivek@cumulusnetworks.com> | 2018-03-10 04:03:41 +0000 |
| commit | 4e262455a252c700f81df75fb8107d112062bba8 (patch) | |
| tree | fbd55c66eebe78ccb60424e560548d1613aa403a /lib/stream.c | |
| parent | bfd498f0dab9a1937c6036cd35ed020b64a69e8f (diff) | |
| parent | 58e7db106d5907cb129fcc316f02ce0bf34e3885 (diff) | |
Merge branch 'master' of https://github.com/frrouting/frr into evpn-ipv6-tenant-routing
Conflicts:
bgpd/bgp_evpn.c
Diffstat (limited to 'lib/stream.c')
| -rw-r--r-- | lib/stream.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/lib/stream.c b/lib/stream.c index 0eb790b753..3c08d4454b 100644 --- a/lib/stream.c +++ b/lib/stream.c @@ -65,19 +65,19 @@ DEFINE_MTYPE_STATIC(LIB, STREAM_FIFO, "Stream FIFO") assert(ENDP_VALID(S, (S)->endp)); \ } while (0) -#define STREAM_BOUND_WARN(S, WHAT) \ - do { \ - zlog_warn("%s: Attempt to %s out of bounds", __func__, \ - (WHAT)); \ - STREAM_WARN_OFFSETS(S); \ - assert(0); \ +#define STREAM_BOUND_WARN(S, WHAT) \ + do { \ + zlog_warn("%s: Attempt to %s out of bounds", __func__, \ + (WHAT)); \ + STREAM_WARN_OFFSETS(S); \ + assert(0); \ } while (0) -#define STREAM_BOUND_WARN2(S, WHAT) \ - do { \ - zlog_warn("%s: Attempt to %s out of bounds", __func__, \ - (WHAT)); \ - STREAM_WARN_OFFSETS(S); \ +#define STREAM_BOUND_WARN2(S, WHAT) \ + do { \ + zlog_warn("%s: Attempt to %s out of bounds", __func__, \ + (WHAT)); \ + STREAM_WARN_OFFSETS(S); \ } while (0) /* XXX: Deprecated macro: do not use */ @@ -353,7 +353,7 @@ inline bool stream_getw2(struct stream *s, uint16_t *word) return false; } - *word = s->data[s->getp++] << 8; + *word = s->data[s->getp++] << 8; *word |= s->data[s->getp++]; return true; @@ -474,13 +474,12 @@ inline bool stream_getl2(struct stream *s, uint32_t *l) return false; } - *l = (unsigned int)(s->data[s->getp++]) << 24; + *l = (unsigned int)(s->data[s->getp++]) << 24; *l |= s->data[s->getp++] << 16; *l |= s->data[s->getp++] << 8; *l |= s->data[s->getp++]; return true; - } u_int32_t stream_getl(struct stream *s) |
