File tree Expand file tree Collapse file tree 2 files changed +18
-24
lines changed
cpp/ql/src/semmle/code/cpp/ir/internal
csharp/ql/src/semmle/code/csharp/ir/internal Expand file tree Collapse file tree 2 files changed +18
-24
lines changed Original file line number Diff line number Diff line change @@ -204,11 +204,9 @@ string bitsToBytesAndBits(IntValue bits) {
204204 hasValue ( bits ) and
205205 bytes = bits / 8 and
206206 leftoverBits = bits % 8 and
207- if leftoverBits = 0 then
208- result = bytes .toString ( )
209- else
210- result = bytes + ":" + leftoverBits
211- ) or
207+ if leftoverBits = 0 then result = bytes .toString ( ) else result = bytes + ":" + leftoverBits
208+ )
209+ or
212210 not hasValue ( bits ) and result = "?"
213211}
214212
@@ -217,11 +215,10 @@ string bitsToBytesAndBits(IntValue bits) {
217215 */
218216bindingset [ bitOffset]
219217string getBitOffsetString ( IntValue bitOffset ) {
220- if hasValue ( bitOffset ) then
221- if bitOffset >= 0 then
222- result = "+" + bitsToBytesAndBits ( bitOffset )
223- else
224- result = "-" + bitsToBytesAndBits ( neg ( bitOffset ) )
225- else
226- result = "+?"
218+ if hasValue ( bitOffset )
219+ then
220+ if bitOffset >= 0
221+ then result = "+" + bitsToBytesAndBits ( bitOffset )
222+ else result = "-" + bitsToBytesAndBits ( neg ( bitOffset ) )
223+ else result = "+?"
227224}
Original file line number Diff line number Diff line change @@ -204,11 +204,9 @@ string bitsToBytesAndBits(IntValue bits) {
204204 hasValue ( bits ) and
205205 bytes = bits / 8 and
206206 leftoverBits = bits % 8 and
207- if leftoverBits = 0 then
208- result = bytes .toString ( )
209- else
210- result = bytes + ":" + leftoverBits
211- ) or
207+ if leftoverBits = 0 then result = bytes .toString ( ) else result = bytes + ":" + leftoverBits
208+ )
209+ or
212210 not hasValue ( bits ) and result = "?"
213211}
214212
@@ -217,11 +215,10 @@ string bitsToBytesAndBits(IntValue bits) {
217215 */
218216bindingset [ bitOffset]
219217string getBitOffsetString ( IntValue bitOffset ) {
220- if hasValue ( bitOffset ) then
221- if bitOffset >= 0 then
222- result = "+" + bitsToBytesAndBits ( bitOffset )
223- else
224- result = "-" + bitsToBytesAndBits ( neg ( bitOffset ) )
225- else
226- result = "+?"
218+ if hasValue ( bitOffset )
219+ then
220+ if bitOffset >= 0
221+ then result = "+" + bitsToBytesAndBits ( bitOffset )
222+ else result = "-" + bitsToBytesAndBits ( neg ( bitOffset ) )
223+ else result = "+?"
227224}
You can’t perform that action at this time.
0 commit comments