From 13a67325e73d2a88b90342317e95294aa69d7a65 Mon Sep 17 00:00:00 2001 From: dcp1990 Date: Sat, 18 Jun 2005 20:37:04 +0000 Subject: [PATCH] Clean up some lint stuff (stmod() and strtol() are clearly defined), and switch from atoi() to strtol9) since the manpage says it is not thread-safe. --- phoned/modems/rockwell.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/phoned/modems/rockwell.c b/phoned/modems/rockwell.c index 605bf93..cf9c890 100644 --- a/phoned/modems/rockwell.c +++ b/phoned/modems/rockwell.c @@ -27,16 +27,18 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -/* $Amigan: phoned/phoned/modems/rockwell.c,v 1.1 2005/06/18 03:10:56 dcp1990 Exp $ */ +/* $Amigan: phoned/phoned/modems/rockwell.c,v 1.2 2005/06/18 20:37:04 dcp1990 Exp $ */ #include #include +#include +#include #include #include #define ROCKWELL_INITSTRING "ATZ\r\nAT E0 #CID=2 V0\r\n" #define ROCKWELL_PICKUP "ATH1\r\n" #define ROCKWELL_HANGUP "ATH\r\n" #define ROCKWELL_RESET "ATZ\r\n" - +/* LINTLIBRARY */ /* PROTOLIB1 */ short plug_init(void) { return 1; /* ok */ @@ -60,7 +62,7 @@ mod_res_t rw_evalrc(result) for(i = 0; i <= strlen(result); i++) { if(result[i] == '\r' || result[i] == '\n') result[i] = '\0'; } - rescode = atoi(result); + rescode = (int)strtol(result, NULL, 0); switch(rescode) { case 0: /* OK */