Lines Matching refs:val

186     uint32_t val;  in test_safe_strtoul()  local
187 assert(safe_strtoul("123", &val)); in test_safe_strtoul()
188 assert(val == 123); in test_safe_strtoul()
189 assert(safe_strtoul("+123", &val)); in test_safe_strtoul()
190 assert(val == 123); in test_safe_strtoul()
191 assert(!safe_strtoul("", &val)); // empty in test_safe_strtoul()
192 assert(!safe_strtoul("123BOGUS", &val)); // non-numeric in test_safe_strtoul()
193 assert(!safe_strtoul(" issue221", &val)); // non-numeric in test_safe_strtoul()
199 assert(safe_strtoul("4294967295", &val)); // 2**32 - 1 in test_safe_strtoul()
200 assert(val == 4294967295L); in test_safe_strtoul()
204 assert(!safe_strtoul("-1", &val)); // negative in test_safe_strtoul()
210 uint64_t val; in test_safe_strtoull() local
211 assert(safe_strtoull("123", &val)); in test_safe_strtoull()
212 assert(val == 123); in test_safe_strtoull()
213 assert(safe_strtoull("+123", &val)); in test_safe_strtoull()
214 assert(val == 123); in test_safe_strtoull()
215 assert(!safe_strtoull("", &val)); // empty in test_safe_strtoull()
216 assert(!safe_strtoull("123BOGUS", &val)); // non-numeric in test_safe_strtoull()
217 assert(!safe_strtoull("92837498237498237498029383", &val)); // out of range in test_safe_strtoull()
218 assert(!safe_strtoull(" issue221", &val)); // non-numeric in test_safe_strtoull()
221 assert(safe_strtoull("18446744073709551615", &val)); // 2**64 - 1 in test_safe_strtoull()
222 assert(val == 18446744073709551615ULL); in test_safe_strtoull()
223 assert(!safe_strtoull("18446744073709551616", &val)); // 2**64 in test_safe_strtoull()
224 assert(!safe_strtoull("-1", &val)); // negative in test_safe_strtoull()
229 int64_t val; in test_safe_strtoll() local
230 assert(safe_strtoll("123", &val)); in test_safe_strtoll()
231 assert(val == 123); in test_safe_strtoll()
232 assert(safe_strtoll("+123", &val)); in test_safe_strtoll()
233 assert(val == 123); in test_safe_strtoll()
234 assert(safe_strtoll("-123", &val)); in test_safe_strtoll()
235 assert(val == -123); in test_safe_strtoll()
236 assert(!safe_strtoll("", &val)); // empty in test_safe_strtoll()
237 assert(!safe_strtoll("123BOGUS", &val)); // non-numeric in test_safe_strtoll()
238 assert(!safe_strtoll("92837498237498237498029383", &val)); // out of range in test_safe_strtoll()
239 assert(!safe_strtoll(" issue221", &val)); // non-numeric in test_safe_strtoll()
242 assert(!safe_strtoll("18446744073709551615", &val)); // 2**64 - 1 in test_safe_strtoll()
243 assert(safe_strtoll("9223372036854775807", &val)); // 2**63 - 1 in test_safe_strtoll()
244 assert(val == 9223372036854775807LL); in test_safe_strtoll()
249 assert(!safe_strtoll("-9223372036854775809", &val)); // -2**63 - 1 in test_safe_strtoll()
252 assert(safe_strtoll(" 123 foo", &val)); in test_safe_strtoll()
253 assert(val == 123); in test_safe_strtoll()
258 int32_t val; in test_safe_strtol() local
259 assert(safe_strtol("123", &val)); in test_safe_strtol()
260 assert(val == 123); in test_safe_strtol()
261 assert(safe_strtol("+123", &val)); in test_safe_strtol()
262 assert(val == 123); in test_safe_strtol()
263 assert(safe_strtol("-123", &val)); in test_safe_strtol()
264 assert(val == -123); in test_safe_strtol()
265 assert(!safe_strtol("", &val)); // empty in test_safe_strtol()
266 assert(!safe_strtol("123BOGUS", &val)); // non-numeric in test_safe_strtol()
267 assert(!safe_strtol("92837498237498237498029383", &val)); // out of range in test_safe_strtol()
268 assert(!safe_strtol(" issue221", &val)); // non-numeric in test_safe_strtol()
274 assert(safe_strtol("2147483647", &val)); // (- (expt 2.0 31) 1) in test_safe_strtol()
275 assert(val == 2147483647L); in test_safe_strtol()
281 assert(safe_strtol(" 123 foo", &val)); in test_safe_strtol()
282 assert(val == 123); in test_safe_strtol()
375 int32_t val; in start_server() local
376 assert(safe_strtol(buffer + 10, &val)); in start_server()
377 *port_out = (in_port_t)val; in start_server()
405 int32_t val; in start_server() local
406 assert(safe_strtol(buffer, &val)); in start_server()
407 pid = (pid_t)val; in start_server()
672 uint8_t val = *ptr; in safe_send() local
673 assert(val == (uint8_t)0x80); in safe_send()
679 val = *(ptr + ii); in safe_send()
680 fprintf(stderr, " 0x%02x", val); in safe_send()
755 uint8_t val = *ptr; in safe_recv_packet() local
756 assert(val == (uint8_t)0x81); in safe_recv_packet()
762 val = *(ptr + ii); in safe_recv_packet()
763 fprintf(stderr, " 0x%02x", val); in safe_recv_packet()