summaryrefslogtreecommitdiff
path: root/tools/HPMHookGen/HPMHookGen.pl
diff options
context:
space:
mode:
Diffstat (limited to 'tools/HPMHookGen/HPMHookGen.pl')
-rwxr-xr-xtools/HPMHookGen/HPMHookGen.pl6
1 files changed, 1 insertions, 5 deletions
diff --git a/tools/HPMHookGen/HPMHookGen.pl b/tools/HPMHookGen/HPMHookGen.pl
index 4dedb48c2..201a82bf8 100755
--- a/tools/HPMHookGen/HPMHookGen.pl
+++ b/tools/HPMHookGen/HPMHookGen.pl
@@ -208,7 +208,6 @@ sub parse($$) {
$lastvar = $var;
}
- my $rtmemset = 0;
my $rtinit = '';
foreach ($rt) { # Decide initialization for the return value
my $x = $_;
@@ -244,8 +243,7 @@ sub parse($$) {
} elsif ($x eq 'DBComparator' or $x eq 'DBHasher' or $x eq 'DBReleaser') { # DB function pointers
$rtinit = ' = NULL';
} elsif ($x =~ /^(?:struct|union)\s+.*$/) { # Structs and unions
- $rtinit = '';
- $rtmemset = 1;
+ $rtinit = ' = { 0 }';
} elsif ($x =~ /^float|double$/) { # Floating point variables
$rtinit = ' = 0.';
} elsif ($x =~ /^(?:(?:un)?signed\s+)?(?:char|int|long|short)$/
@@ -267,7 +265,6 @@ sub parse($$) {
vname => $variadic ? "v$name" : $name,
type => $rt,
typeinit => $rtinit,
- memset => $rtmemset,
variadic => $variadic,
args => \@args,
notes => $notes,
@@ -687,7 +684,6 @@ EOF
unless ($if->{type} eq 'void') {
$initialization = "\n\t$if->{type} retVal___$if->{typeinit};";
- $initialization .= "\n\tmemset(&retVal___, '\\0', sizeof($if->{type}));" if $if->{memset};
}
$beforeblock3 .= "\n\t\t\t$_" foreach (@{ $if->{before} });