centreon / centreon-dsm

Dynamic Service Monitoring
4 stars 7 forks source link

Unused code #28

Closed garnier-quentin closed 7 years ago

garnier-quentin commented 8 years ago

In the following commented code is not used:

sub cleanEmptyMacros($$) {
    my ($dbh, $dbh2) = @_;

    #my $sth = $dbhS->prepare("SELECT * from mod_dsm_locks");
    #if (!defined($sth)) {
    #    writeLogFile($DBI::errstr, "EE");
    #}
    #my @locks;
    #if ($sth->execute()) {
    #    while (my $lock = $sth->fetchrow_hashref()) {
    #        $locks[$lock->{'host_name'}.";".$lock->{'service_description'}] = 1;
    #    }
    #    $sth->finish();
    #}

The table '@locks' is used like a hash table ???!! In fact, the table is never used anywhere else in the code.

Another variable is not used: '@fullHostList'. Should be removed.