diff options
| author | William A. Kennington III <wak@google.com> | 2018-12-03 15:32:12 -0800 |
|---|---|---|
| committer | Ratan Gupta <ratagupt@linux.vnet.ibm.com> | 2018-12-06 18:28:19 +0000 |
| commit | cb500dc2b5def5773d693e88aa432e5f2ba5a585 (patch) | |
| tree | a1ee72db8236bcf4e6aedfa8e278b9e9ee4dd0b6 | |
| parent | 9a85a2c11002f8d62c596d22228bed2d4f81e787 (diff) | |
| download | phosphor-networkd-cb500dc2b5def5773d693e88aa432e5f2ba5a585.tar.gz phosphor-networkd-cb500dc2b5def5773d693e88aa432e5f2ba5a585.zip | |
rtnetlink: Remove redundtant hasExpired() check
We don't need to check if the timer is expired and enabled because the
timer will never be expired if it is enabled.
Tested:
Built and networkd still receives link state transitions and
populates the discovered ip addresses correctly.
Change-Id: I066842af9046190541f868d25319016f34012de3
Signed-off-by: William A. Kennington III <wak@google.com>
| -rw-r--r-- | rtnetlink_server.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/rtnetlink_server.cpp b/rtnetlink_server.cpp index 9daf9ad..69fb4ec 100644 --- a/rtnetlink_server.cpp +++ b/rtnetlink_server.cpp @@ -46,8 +46,7 @@ static int eventHandler(sd_event_source* es, int fd, uint32_t revents, { // starting the timer here to make sure that we don't want // create the child objects multiple times. - if (!refreshObjectTimer->isEnabled() || - refreshObjectTimer->hasExpired()) + if (!refreshObjectTimer->isEnabled()) { // if start timer throws exception then let the application // crash |

