You’re correct in a lot of languages; Excel comes to mind. Just that’s not how int rand()
works in C.
Sorry, I don’t why you’re getting snark and even being accused of using the word “integer”.
Comment on Me after I got fired
LastYearsPumpkin@feddit.ch 10 months ago
But rand() is a number between 0-1, so it will never be >10
Basically this is just #define True = False
You’re correct in a lot of languages; Excel comes to mind. Just that’s not how int rand()
works in C.
Sorry, I don’t why you’re getting snark and even being accused of using the word “integer”.
I’m not sure what’s worse. The engineer that thought this would work or the company that doesn’t do code reviews.
Pit it in a package they depend on - nobody reviews those
Pick a library you already use with many sub-dependencies. Make a new library with your evil code. Name it in line with the step 1 library. Oh hi there “Framework.Microsoft.Extensions.DB.Net.Compatibility” you couldn’t possibly have anything bad going on in you, plus you sound really boring to review, I’m sure it’s fine.
genfood@feddit.de 10 months ago
The C standard library function rand(void) returns a random integer between 0 and RAND_MAX (which should be at least 2^15, depending on the actual implementation).