Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32501 )
Change subject: include: Implement abs()
......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/#/c/32501/3/src/include/stdlib.h
File src/include/stdlib.h:
https://review.coreboot.org/#/c/32501/3/src/include/stdlib.h@14
PS3, Line 14: static inline int abs(int i)
: {
: return i < 0 ? -i : i;
: }
Would it not make more sense to implement it as a macro such that you can use different integer type […]
it's a function defined in C89. It might cause issues if it does not return an int.
--
To view, visit
https://review.coreboot.org/c/coreboot/+/32501
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I0719de6558cf9224ecbbd46b6f8a8040e8225a79
Gerrit-Change-Number: 32501
Gerrit-PatchSet: 3
Gerrit-Owner: Patrick Rudolph
patrick.rudolph@9elements.com
Gerrit-Reviewer: Patrick Rudolph
patrick.rudolph@9elements.com
Gerrit-Reviewer: build bot (Jenkins)
no-reply@coreboot.org
Gerrit-CC: Arthur Heymans
arthur@aheymans.xyz
Gerrit-Comment-Date: Mon, 29 Apr 2019 08:53:21 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Arthur Heymans
arthur@aheymans.xyz
Gerrit-MessageType: comment