Commit b59958282a01cdf9e8a309019d3d16279092ff52
1 parent
c40a515e
only set the missed output argument when it is not NULL
Showing
1 changed file
with
2 additions
and
2 deletions
| ... | ... | @@ -59,9 +59,9 @@ TR_timerGet(TR_Timer this, unsigned long * missed) |
| 59 | 59 | if (_missed) { |
| 60 | 60 | this->sec += _missed * this->timeout * sec_factor / nan_factor; |
| 61 | 61 | this->nsec += _missed * this->timeout * sec_factor % nan_factor; |
| 62 | - *missed = _missed; | |
| 62 | + if (missed) *missed = _missed; | |
| 63 | 63 | } else { |
| 64 | - *missed = 0; | |
| 64 | + if (missed) *missed = 0; | |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | return this->timeout - (elapsed % this->timeout); | ... | ... |
Please
register
or
login
to post a comment