From: Ton Voon Date: Fri, 21 Feb 2003 21:46:27 +0000 (+0000) Subject: Strip leading spaces on dns return value (689563 - Simon L Nielsen) X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=782bc207d5697f539beb1fd3359ce81d22e26a54;p=nagiosplug.git Strip leading spaces on dns return value (689563 - Simon L Nielsen) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@350 f882894a-f735-0410-b71e-b25c423dba1c --- diff --git a/plugins/check_dns.c b/plugins/check_dns.c index c0ea298..19649f5 100644 --- a/plugins/check_dns.c +++ b/plugins/check_dns.c @@ -132,7 +132,11 @@ main (int argc, char **argv) printf ("%s\n", input_buffer); if ((temp_buffer = index (input_buffer, ':'))) { - address = strscpy (address, temp_buffer + 2); + temp_buffer++; + /* Strip leading spaces */ + for (; *temp_buffer != '\0' && *temp_buffer == ' '; temp_buffer++) + /* NOOP */; + address = strscpy (address, temp_buffer); strip (address); result = STATE_OK; }