1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Remove unsued variable $glob_hostname, unused functions

'mtr_short_hostname' and 'mtr_full_hostname'
This commit is contained in:
unknown
2007-08-24 15:43:45 +02:00
parent 6ba1e8a039
commit b18447112c
2 changed files with 4 additions and 30 deletions

View File

@ -20,8 +20,6 @@
use strict;
sub mtr_full_hostname ();
sub mtr_short_hostname ();
sub mtr_native_path($);
sub mtr_init_args ($);
sub mtr_add_arg ($$@);
@ -40,30 +38,6 @@ sub mtr_cmp_opts($$);
#
##############################################################################
# We want the fully qualified host name and hostname() may have returned
# only the short name. So we use the resolver to find out.
# Note that this might fail on some platforms
sub mtr_full_hostname () {
my $hostname= hostname();
if ( $hostname !~ /\./ )
{
my $address= gethostbyname($hostname)
or mtr_error("Couldn't resolve $hostname : $!");
my $fullname= gethostbyaddr($address, AF_INET);
$hostname= $fullname if $fullname;
}
return $hostname;
}
sub mtr_short_hostname () {
my $hostname= hostname();
$hostname =~ s/\..+$//;
return $hostname;
}
# Convert path to OS native format
sub mtr_native_path($)
{