Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2002:
[Freeciv-Dev] [Patch] Remove atoi
Home

[Freeciv-Dev] [Patch] Remove atoi

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] [Patch] Remove atoi
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 23 Feb 2002 19:04:33 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

The attached patch removes atoi. Atoi is bad since there is no way to
detect errors. server/stdinhand.c is the only one to try to test for
this:
    val = atoi(arg);
    if (!val && arg[0] != '0') {
      cmd_reply(CMD_SET, caller, C_SYNTAX,
                _("Value must be an integer."));

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 Q:  Do you know what the death rate around here is?
 A:  One per person.

Attachment: atoi1.diff
Description: Text document


[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] [Patch] Remove atoi, Raimar Falke <=