aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRandy Dunlap <rdunlap@xenotime.net>2005-07-07 15:39:26 -0700
committerSam Ravnborg <sam@mars.(none)>2005-07-13 23:18:36 +0000
commit2283a117f65650352f2a9fd6b9af4cdbf5478d14 (patch)
tree7edbe30174376b214e8583b3a0b24cb1c26f625c /scripts
parent66da665ca36b07728acf35881f918a89a2c9fbb2 (diff)
downloadkernel_samsung_smdk4412-2283a117f65650352f2a9fd6b9af4cdbf5478d14.tar.gz
kernel_samsung_smdk4412-2283a117f65650352f2a9fd6b9af4cdbf5478d14.tar.bz2
kernel_samsung_smdk4412-2283a117f65650352f2a9fd6b9af4cdbf5478d14.zip
[PATCH] scripts/kernel-doc: don't use uninitialized SRCTREE
Current kernel-doc (perl) script generates this warning: Use of uninitialized value in concatenation (.) or string at scripts/kernel-doc line 1668. So explicitly check for SRCTREE in the ENV before using it, and then if it is set, append a '/' to the end of it, otherwise the SRCTREE + filename can (will) be missing the intermediate '/'. Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/kernel-doc8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 0835dc2a8aa..8aaf74e6418 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -1665,11 +1665,17 @@ sub xml_escape($) {
}
sub process_file($) {
- my ($file) = "$ENV{'SRCTREE'}@_";
+ my $file;
my $identifier;
my $func;
my $initial_section_counter = $section_counter;
+ if (defined($ENV{'SRCTREE'})) {
+ $file = "$ENV{'SRCTREE'}" . "/" . "@_";
+ }
+ else {
+ $file = "@_";
+ }
if (defined($source_map{$file})) {
$file = $source_map{$file};
}