I'm looking into fortify issues identified in some open source C code our service uses and see code like this;
..
} else if (n < (1024LL*1024*1024)) {
..
What is the significance of the LL on 1024LL as opposed to just 1024? Thanks.
I'm looking into fortify issues identified in some open source C code our service uses and see code like this;
..
} else if (n < (1024LL*1024*1024)) {
..
What is the significance of the LL on 1024LL as opposed to just 1024? Thanks.
LL is a suffix that means long long. In that particular snippet of code, the writer is saying one of the terms is 1024 but stored in a long long way. C has a rule that says the largest bits of any of the terms will be what it uses when it resolves integer math. Without the LL, then, 1024 * 1024 * 1024 would just overflow.