small code/comment cleanups

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2022-01-13 14:50:14 +01:00
parent 3efa9ecd60
commit a45a1df1ed
3 changed files with 3 additions and 7 deletions

View File

@ -243,8 +243,7 @@ sub setup {
initlog($self->{name});
my $restart = $ENV{RESTART_PVE_DAEMON};
delete $ENV{RESTART_PVE_DAEMON};
my $restart = delete $ENV{RESTART_PVE_DAEMON};
$self->{env_restart_pve_daemon} = $restart;
my $lockfd = $ENV{PVE_DAEMON_LOCK_FD};
@ -573,7 +572,6 @@ my $read_pid = sub {
# checks if the process was started by systemd
my $init_ppid = sub {
if (getppid() == 1) {
return 1;
} else {

View File

@ -69,8 +69,7 @@ sub api_clone_schema {
}
}
my $tmp = ref($pd) ? clone($pd) : $pd;
# NOTE: add typetext property for more complex types, to
# make the web api viewer code simpler
# NOTE: add typetext property for complexer types, to make the web api-viewer code simpler
if (!$no_typetext && !(defined($tmp->{enum}) || defined($tmp->{pattern}))) {
my $typetext = PVE::JSONSchema::schema_get_type_text($tmp);
if ($tmp->{type} && ($tmp->{type} ne $typetext)) {

View File

@ -1210,8 +1210,7 @@ sub decode_text {
return Encode::decode("utf8", uri_unescape($data));
}
# depreciated - do not use!
# we now decode all parameters by default
# NOTE: deprecated - do not use! we now decode all parameters by default
sub decode_utf8_parameters {
my ($param) = @_;