long long vs int64_t

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Neels Hofmeyr nhofmeyr at sysmocom.de
Wed Sep 15 17:17:11 UTC 2021


On Wed, Sep 15, 2021 at 12:22:20PM +0200, Harald Welte wrote:
> > > 1434     	if (val < INT64_MIN) {
> 
> Wouldn't they go away with a simple change from INT64_MIN/MAX to LLONG_MIN/MAX?

I want to specifically use INT64_MIN to check whether the long long value,
which theoretically might be higher range than int64_t, surpasses int64_t
range.

It also wouldn't go away, because a 64 bit signed int val can never be smaller
than INT64_MIN. I'm aware of that, but still want to have that check there for
I guess autistic obsessive perfectionism, just in case long long gets longer.



More information about the OpenBSC mailing list