[monitoring-plugins] check_dns: simplify loop
Rolf Eike Beer <[email protected]> Fri, 15 Feb 2019 09:10:14 +0100 (CET)
| Newsgroups | gmane.network.nagios.cvs |
|---|---|
| Message-ID | <20190215081014.E2A5B200877C__19670.2539267548$1550218221$gmane$org@orwell.monitoring-plugins.org> |
Module: monitoring-plugins Branch: master Commit: e60c6c04f04022a72bf3a1074402342e948c8c0f Author: Rolf Eike Beer <[email protected]> Date: Wed Jul 25 19:05:16 2018 +0200 URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=e60c6c0 check_dns: simplify loop --- plugins/check_dns.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/check_dns.c b/plugins/check_dns.c index f206163..ae4123b 100644 --- a/plugins/check_dns.c +++ b/plugins/check_dns.c @@ -168,8 +168,8 @@ main (int argc, char **argv) temp_buffer++; /* Strip leading spaces */ - for (; *temp_buffer != '\0' && *temp_buffer == ' '; temp_buffer++) - /* NOOP */; + while (*temp_buffer == ' ') + temp_buffer++; strip(temp_buffer); if (temp_buffer==NULL || strlen(temp_buffer)==0) {