in reply to How to eliminate warning message on hash value?
$$keyptr = $$db{CurrentKey} = $SavSubtree[$curuser][$$db{RSubtreeno}]; if ( defined($$keyptr) ) { my $datapos = $RSubtree{$curuser}{$$keyptr}; if ( defined($datapos) ) { $ret = GetDataRecord( $db, $keyptr, $dataptr, $datapos ); if ( $ret == TRUE ) { flock( $$db{btree}, LOCK_UN ); return ""; } } }
What's with == TRUE? Perl subs don't tend to define what true value they return on success.
$$keyptr = $$db{CurrentKey} = $SavSubtree[$curuser][$$db{RSubtreeno}]; if ( defined($$keyptr) ) { my $datapos = $RSubtree{$curuser}{$$keyptr}; if ( defined($datapos) ) { if ( GetDataRecord( $db, $keyptr, $dataptr, $datapos ) ) { flock( $$db{btree}, LOCK_UN ); return ""; } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to eliminate warning message on hash value?
by Marshall (Canon) on Dec 08, 2011 at 11:49 UTC | |
by ikegami (Patriarch) on Dec 20, 2011 at 00:43 UTC | |
by Marshall (Canon) on Dec 20, 2011 at 05:23 UTC | |
by ikegami (Patriarch) on Dec 20, 2011 at 06:04 UTC | |
by Marshall (Canon) on Dec 28, 2011 at 00:07 UTC | |
| |
|
Re^2: How to eliminate warning message on hash value?
by flexvault (Monsignor) on Dec 08, 2011 at 13:57 UTC | |
by ikegami (Patriarch) on Dec 08, 2011 at 18:34 UTC |