mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] timeconst.pl: remove deprecated defined(@array)
@ 2012-02-15 21:06 Dagfinn Ilmari Mannsåker
  0 siblings, 0 replies; only message in thread
From: Dagfinn Ilmari Mannsåker @ 2012-02-15 21:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Dagfinn Ilmari Mannsåker

The use of defined() on arrays and hashes has been deprecated since perl
5.6, but until 5.17.6 it only warned on lexicals, not package globals.

Signed-off-by: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
---
 kernel/timeconst.pl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/timeconst.pl b/kernel/timeconst.pl
index eb51d76..0461239 100644
--- a/kernel/timeconst.pl
+++ b/kernel/timeconst.pl
@@ -370,7 +370,7 @@ if ($hz eq '--can') {
 	}
 
 	@val = @{$canned_values{$hz}};
-	if (!defined(@val)) {
+	if (!@val) {
 		@val = compute_values($hz);
 	}
 	output($hz, @val);
-- 
1.7.5.4


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-02-15 21:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-15 21:06 [PATCH] timeconst.pl: remove deprecated defined(@array) Dagfinn Ilmari Mannsåker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®