1 /*
2  *  Copyright (C) 1991, 1992  Linus Torvalds
3  */
4 
5 #include <xen/lib.h>
6 
7 /**
8  * simple_strtol - convert a string to a signed long
9  * @cp: The start of the string
10  * @endp: A pointer to the end of the parsed string will be placed here
11  * @base: The number base to use
12  */
simple_strtol(const char * cp,const char ** endp,unsigned int base)13 long simple_strtol(const char *cp, const char **endp, unsigned int base)
14 {
15     if ( *cp == '-' )
16         return -simple_strtoul(cp + 1, endp, base);
17     return simple_strtoul(cp, endp, base);
18 }
19 
20 /*
21  * Local variables:
22  * mode: C
23  * c-file-style: "BSD"
24  * c-basic-offset: 4
25  * tab-width: 4
26  * indent-tabs-mode: nil
27  * End:
28  */
29