improve the units-1.88-coverity.patch
Thanks to Adrian Mariano.
This commit is contained in:
parent
fdfae8d301
commit
f805147fe2
@ -49,17 +49,16 @@ index cdda76a..c4230c9 100644
|
||||
if (readerr == E_FILE) {
|
||||
if (errfile)
|
||||
fprintf(errfile, "%s: unable to open included file '%s' at line %d of file '%s\n", progname, includefile, linenum, file);
|
||||
@@ -1381,7 +1384,8 @@ subunitroot(int n,char *in[], char *out[])
|
||||
@@ -1381,7 +1384,7 @@ subunitroot(int n,char *in[], char *out[])
|
||||
char **ptr,**current;
|
||||
int count;
|
||||
|
||||
- for(current = in;*current && *current==NULLUNIT;current++);
|
||||
+ for(current = in;*current==NULLUNIT;current++)
|
||||
+ if (!*current) return E_NOTROOT;
|
||||
count = 0;
|
||||
for(ptr=in;*ptr;ptr++){
|
||||
if (*ptr==NULLUNIT) continue;
|
||||
@@ -2618,7 +2622,7 @@ Typing 'search text' will show units whose names contain 'text'.\n\n",
|
||||
@@ -2618,7 +2621,7 @@ Typing 'search text' will show units whose names contain 'text'.\n\n",
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
Summary: A utility for converting amounts from one unit to another
|
||||
Name: units
|
||||
Version: 1.88
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
Source: ftp://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz
|
||||
URL: http://www.gnu.org/software/units/units.html
|
||||
License: GPLv3+
|
||||
@ -59,6 +59,9 @@ fi
|
||||
%{_mandir}/man1/*
|
||||
|
||||
%changelog
|
||||
* Thu Nov 17 2011 Kamil Dudka <kdudka@redhat.com> - 1.88-5
|
||||
- improve the units-1.88-coverity.patch (thanks to Adrian Mariano)
|
||||
|
||||
* Wed Nov 16 2011 Kamil Dudka <kdudka@redhat.com> - 1.88-4
|
||||
- fix code defects found by Coverity
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user