blob: d046f95050a390751bc33a1412c1a685424b271b [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001From 2af30e9b2988111e45ed6ea6af55e49ec7cb1cb1 Mon Sep 17 00:00:00 2001
2From: Andrea Adami <andrea.adami@gmail.com>
3Date: Sun, 29 Jun 2014 00:44:57 +0200
4Subject: [PATCH 6/9] libiniparser: remove unused function needing float
5
6Fixes:
7| LD ubi-utils/ubiformat
8| .../git/ubi-utils/libiniparser.a(libiniparser.o): In function
9| ` LD ubi-utils/ubirename
10| iniparser_getdouble':
11| .../git/ubi-utils/libiniparser.c:336: undefined reference to `atof'
12
13Grep doesn't reveal any occurrence of iniparser_getdouble(), using atof() so
14remove it: floating-point is not supported in klibc
15
16Upstream-Status: Accepted
17
18Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
19---
20 ubi-utils/include/libiniparser.h | 15 ---------------
21 ubi-utils/libiniparser.c | 22 ----------------------
22 2 files changed, 37 deletions(-)
23
24diff --git a/ubi-utils/include/libiniparser.h b/ubi-utils/include/libiniparser.h
25index be3c667..abd77aa 100644
26--- a/ubi-utils/include/libiniparser.h
27+++ b/ubi-utils/include/libiniparser.h
28@@ -158,21 +158,6 @@ int iniparser_getint(dictionary * d, const char * key, int notfound);
29
30 /*-------------------------------------------------------------------------*/
31 /**
32- @brief Get the string associated to a key, convert to a double
33- @param d Dictionary to search
34- @param key Key string to look for
35- @param notfound Value to return in case of error
36- @return double
37-
38- This function queries a dictionary for a key. A key as read from an
39- ini file is given as "section:key". If the key cannot be found,
40- the notfound value is returned.
41- */
42-/*--------------------------------------------------------------------------*/
43-double iniparser_getdouble(dictionary * d, char * key, double notfound);
44-
45-/*-------------------------------------------------------------------------*/
46-/**
47 @brief Get the string associated to a key, convert to a boolean
48 @param d Dictionary to search
49 @param key Key string to look for
50diff --git a/ubi-utils/libiniparser.c b/ubi-utils/libiniparser.c
51index 898f57f..ba70c08 100644
52--- a/ubi-utils/libiniparser.c
53+++ b/ubi-utils/libiniparser.c
54@@ -316,28 +316,6 @@ int iniparser_getint(dictionary * d, const char * key, int notfound)
55
56 /*-------------------------------------------------------------------------*/
57 /**
58- @brief Get the string associated to a key, convert to a double
59- @param d Dictionary to search
60- @param key Key string to look for
61- @param notfound Value to return in case of error
62- @return double
63-
64- This function queries a dictionary for a key. A key as read from an
65- ini file is given as "section:key". If the key cannot be found,
66- the notfound value is returned.
67- */
68-/*--------------------------------------------------------------------------*/
69-double iniparser_getdouble(dictionary * d, char * key, double notfound)
70-{
71- char * str ;
72-
73- str = iniparser_getstring(d, key, INI_INVALID_KEY);
74- if (str==INI_INVALID_KEY) return notfound ;
75- return atof(str);
76-}
77-
78-/*-------------------------------------------------------------------------*/
79-/**
80 @brief Get the string associated to a key, convert to a boolean
81 @param d Dictionary to search
82 @param key Key string to look for
83--
842.7.4
85