]> git.gsnw.org Git - fping.git/commitdiff
fix wrong use of pointer (causing segfault)
authorDavid Schweikert <david@schweikert.ch>
Thu, 16 Aug 2012 09:24:02 +0000 (11:24 +0200)
committerDavid Schweikert <david@schweikert.ch>
Thu, 16 Aug 2012 09:24:02 +0000 (11:24 +0200)
src/fping.c

index c39975f9efda0aa2746c564217c73f099d8997c9..73182cef9283d4e0b410dd531f4028cc01a5de9c 100644 (file)
@@ -859,7 +859,6 @@ int main( int argc, char **argv )
         FILE *ping_file;
         char line[132];
         char host[132];
-        char *p;
         
         if( strcmp( filename, "-" ) == 0 )
             ping_file = fdopen( 0, "r" );
@@ -878,7 +877,7 @@ int main( int argc, char **argv )
             if( ( !*host ) || ( host[0] == '#' ) )  /* magic to avoid comments */
                 continue;
             
-            add_name(p);
+            add_name(host);
         }/* WHILE */
         
         fclose( ping_file );