Skip to content

Commit 813de65

Browse files
authored
Merge pull request github#8799 from jketema/comment-fix
C++: Fix the layout of comments in `getBufferSize`
2 parents bd09c61 + a09fd8c commit 813de65

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cpp/ql/lib/semmle/code/cpp/commons/Buffer.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ int getBufferSize(Expr bufferExpr, Element why) {
2727
result = bufferVar.getUnspecifiedType().(ArrayType).getSize() and
2828
why = bufferVar and
2929
not memberMayBeVarSize(_, bufferVar) and
30-
not result = 0 // zero sized arrays are likely to have special usage, for example
31-
or
30+
// zero sized arrays are likely to have special usage, for example
3231
// behaving a bit like a 'union' overlapping other fields.
33-
// buffer is an initialized array
34-
// e.g. int buffer[] = {1, 2, 3};
32+
not result = 0
33+
or
34+
// buffer is an initialized array, e.g., int buffer[] = {1, 2, 3};
3535
why = bufferVar.getInitializer().getExpr() and
3636
(
3737
why instanceof AggregateLiteral or

0 commit comments

Comments
 (0)