[liblinear] 02/06: Fix wrong function call in float parsing (epsilon, etc.)

Christian Kastner chrisk-guest at moszumanska.debian.org
Tue Aug 26 18:30:04 UTC 2014


This is an automated email from the git hooks/post-receive script.

chrisk-guest pushed a commit to branch master
in repository liblinear.

commit 1c30b6f7f0000c2ee7a52c4295e7c62b05188671
Author: Christian Kastner <debian at kvr.at>
Date:   Tue Aug 26 10:08:42 2014 -0700

    Fix wrong function call in float parsing (epsilon, etc.)
    
    Because of copy-pasta, strol() was being used where strtof() was expected.
---
 debian/patches/0006-Improve-option-parsing.patch | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/debian/patches/0006-Improve-option-parsing.patch b/debian/patches/0006-Improve-option-parsing.patch
index 7e161fd..58385cd 100644
--- a/debian/patches/0006-Improve-option-parsing.patch
+++ b/debian/patches/0006-Improve-option-parsing.patch
@@ -95,7 +95,7 @@ index 0b4be97..831275f 100644
  	}
  
 diff --git a/train.c b/train.c
-index 4920313..35f51d0 100644
+index 4920313..fd00525 100644
 --- a/train.c
 +++ b/train.c
 @@ -4,6 +4,7 @@
@@ -127,7 +127,7 @@ index 4920313..35f51d0 100644
 +static float strtof_or_exit(const char *str) {
 +	errno = 0;
 +	char *endptr;
-+	float val = strtol(str, &endptr, 10);
++	float val = strtof(str, &endptr);
 +
 +	if ((errno == ERANGE && (val == HUGE_VALF || val == HUGE_VALL)) || (errno != 0 && val == 0.0)) {
 +		perror("error converting %s to float:");

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/liblinear.git



More information about the debian-science-commits mailing list