fix net_services_name retval

This commit is contained in:
Doug MacEachern 2007-09-23 23:49:29 +00:00
parent 8c982e45ff
commit 0b38c6455d
2 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ def format_port(sigar, proto, port, is_numeric)
end
if !is_numeric
service = sigar.net_services_name(proto, port)
if service != false
if service != nil
return service
end
end

View File

@ -212,7 +212,7 @@ static VALUE rb_sigar_net_services_name(VALUE obj, VALUE protocol, VALUE port)
return rb_str_new2(name);
}
else {
Qnil;
return Qnil;
}
}