Deleted Added
full compact
enc_cbor.c (287111) enc_cbor.c (298083)
1/*
2 * Copyright (c) 2015, Juniper Networks, Inc.
3 * All rights reserved.
4 * This SOFTWARE is licensed under the LICENSE provided in the
5 * ../Copyright file. By downloading, installing, copying, or otherwise
6 * using the SOFTWARE, you agree to be bound by the terms of that
7 * LICENSE.
8 * Phil Shafer, August 2015

--- 121 unchanged lines hidden (view full) ---

130} cbor_private_t;
131
132static void
133cbor_encode_uint (xo_buffer_t *xbp, uint64_t minor, unsigned limit)
134{
135 char *bp = xbp->xb_curp;
136 int i, m;
137
1/*
2 * Copyright (c) 2015, Juniper Networks, Inc.
3 * All rights reserved.
4 * This SOFTWARE is licensed under the LICENSE provided in the
5 * ../Copyright file. By downloading, installing, copying, or otherwise
6 * using the SOFTWARE, you agree to be bound by the terms of that
7 * LICENSE.
8 * Phil Shafer, August 2015

--- 121 unchanged lines hidden (view full) ---

130} cbor_private_t;
131
132static void
133cbor_encode_uint (xo_buffer_t *xbp, uint64_t minor, unsigned limit)
134{
135 char *bp = xbp->xb_curp;
136 int i, m;
137
138 if (minor > (1UL<<32)) {
138 if (minor > (1ULL << 32)) {
139 *bp++ |= CBOR_LEN64;
140 m = 64;
141
142 } else if (minor > (1<<16)) {
143 *bp++ |= CBOR_LEN32;
144 m = 32;
145
146 } else if (minor > (1<<8)) {

--- 219 unchanged lines hidden ---
139 *bp++ |= CBOR_LEN64;
140 m = 64;
141
142 } else if (minor > (1<<16)) {
143 *bp++ |= CBOR_LEN32;
144 m = 32;
145
146 } else if (minor > (1<<8)) {

--- 219 unchanged lines hidden ---