Bugzilla – Attachment 70970 Details for
Bug 20056
Uninitialized warn in cmp_sysprefs.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20056: Resolve uninitialized warn in cmp_sysprefs.pl
Bug-20056-Resolve-uninitialized-warn-in-cmpsyspref.patch (text/plain), 1.29 KB, created by
Nick Clemens (kidclamp)
on 2018-01-26 18:35:28 UTC
(
hide
)
Description:
Bug 20056: Resolve uninitialized warn in cmp_sysprefs.pl
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2018-01-26 18:35:28 UTC
Size:
1.29 KB
patch
obsolete
>From cec26631dd2a346753f1a6db76bc650f65e6d1d3 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 22 Jan 2018 09:49:36 +0100 >Subject: [PATCH] Bug 20056: Resolve uninitialized warn in cmp_sysprefs.pl > >When running a compare with --upd flag, I got the following warn: > Use of uninitialized value in addition (+) at misc/maintenance/cmp_sysprefs.pl line 125. >This is simply resolved by not returning undef but 0 in case of the Version >syspref in the sub UpdateOnePref. > >Test plan: >Look at this simple change. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > misc/maintenance/cmp_sysprefs.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/misc/maintenance/cmp_sysprefs.pl b/misc/maintenance/cmp_sysprefs.pl >index 1abdaa9..936d3c6 100755 >--- a/misc/maintenance/cmp_sysprefs.pl >+++ b/misc/maintenance/cmp_sysprefs.pl >@@ -217,7 +217,7 @@ sub InsertIgnoreOnePref { > > sub UpdateOnePref { > my ( $k, $v ) = @_; >- return if lc $k eq 'version'; >+ return 0 if lc $k eq 'version'; > my $i = $dbh->do( 'UPDATE systempreferences SET value=? WHERE variable=?', undef, ( $v, $k ) ); > return !defined($i) || $i eq '0E0'? 0: $i; > } >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 20056
:
70789
|
70930
| 70970