Vitezslav Samel <vitezslav(a)samel.cz> writes:
On Tue, Apr 24, 2012 at 10:49:40AM +0200, Nikola Pajkovsky wrote:
> Vitezslav Samel <vitezslav(a)samel.cz> writes:
>
> > Signed-off-by: Vitezslav Samel <vitezslav(a)samel.cz>
> > ---
> > src/iptraf-ng-compat.h | 28 ----------------------------
> > 1 files changed, 0 insertions(+), 28 deletions(-)
> >
> > diff --git a/src/iptraf-ng-compat.h b/src/iptraf-ng-compat.h
> > index 7ccc298..71f54f8 100644
> > --- a/src/iptraf-ng-compat.h
> > +++ b/src/iptraf-ng-compat.h
> > @@ -92,32 +92,4 @@ extern void die(const char *err, ...);
> > extern void die_errno(const char *err) __noreturn;
> > extern void error(const char *err, ...);
> >
> > -#if 0
> > -static inline int strtoul_ui(char const *s, int base, unsigned int *result)
> > -{
> > - unsigned long ul;
> > - char *p;
> > -
> > - errno = 0;
> > - ul = strtoul(s, &p, base);
> > - if (errno || *p || p == s || (unsigned int) ul != ul)
> > - return -1;
> > - *result = ul;
> > - return 0;
> > -}
> > -
> > -static inline int strtol_i(char const *s, int base, int *result)
> > -{
> > - long ul;
> > - char *p;
> > -
> > - errno = 0;
> > - ul = strtol(s, &p, base);
> > - if (errno || *p || p == s || (int) ul != ul)
> > - return -1;
> > - *result = ul;
> > - return 0;
> > -}
> > -#endif
> > -
> > #endif /* IPTRAF_NG_COMPAT_H */
>
> those guys are here to replace unreliable atoi
OK, so we should move it to wrapper.[ch]
yup
--
Nikola