mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: ban unsafe pointer/fn comparison (#14462)
This commit is contained in:
@ -645,7 +645,7 @@ pub fn channel_select(mut channels []&Channel, dir []Direction, mut objrefs []vo
|
||||
unsafe {
|
||||
*subscr[i].prev = subscr[i].nxt
|
||||
}
|
||||
if subscr[i].nxt != 0 {
|
||||
if unsafe { subscr[i].nxt != 0 } {
|
||||
subscr[i].nxt.prev = subscr[i].prev
|
||||
// just in case we have missed a semaphore during restore
|
||||
subscr[i].nxt.sem.post()
|
||||
@ -659,7 +659,7 @@ pub fn channel_select(mut channels []&Channel, dir []Direction, mut objrefs []vo
|
||||
unsafe {
|
||||
*subscr[i].prev = subscr[i].nxt
|
||||
}
|
||||
if subscr[i].nxt != 0 {
|
||||
if unsafe { subscr[i].nxt != 0 } {
|
||||
subscr[i].nxt.prev = subscr[i].prev
|
||||
subscr[i].nxt.sem.post()
|
||||
}
|
||||
|
Reference in New Issue
Block a user