Skip to content

Commit bd07f27

Browse files
Update cpp/autosar/src/rules/A8-4-7/TriviallyCopyableSmallType.qll
Co-authored-by: Remco Vermeulen <[email protected]>
1 parent 75ba9ab commit bd07f27

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpp/autosar/src/rules/A8-4-7/TriviallyCopyableSmallType.qll

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ int wordSize() { result = max(VoidPointerType v | | v.getSize()) }
1212
* Converts bytes to words
1313
*/
1414
bindingset[bytes]
15-
float bytesToWords(float bytes) { result = bytes / wordSize() }
15+
int minWordsRequiredToRepresentBytes(int bytes) { result = (1.0*bytes / wordSize()).ceil() }
1616

1717
class TriviallyCopyableSmallType extends Type {
1818
TriviallyCopyableSmallType() {

0 commit comments

Comments
 (0)