[ovs-discuss] Input argument to atoi

neeraj mehta mehtaneeraj07 at gmail.com
Wed Sep 16 18:45:54 UTC 2015


On Tue, Sep 15, 2015 at 11:52 PM, neeraj mehta <mehtaneeraj07 at gmail.com>
wrote:

> Hi Team,
>
> I was looking a the code in learn.c file. As per my understanding atoi
> function take const char * as an input argument. but in the below snippet
> value is passed as argument which is char *.
>
> } else if (!strcmp(name, "priority")) {
>             learn->priority = atoi(value);
>         } else if (!strcmp(name, "idle_timeout")) {
>             learn->idle_timeout = atoi(value);
>         } else if (!strcmp(name, "hard_timeout")) {
>             learn->hard_timeout = atoi(value);
>         } else if (!strcmp(name, "fin_idle_timeout")) {
>             learn->fin_idle_timeout = atoi(value);
>         } else if (!strcmp(name, "fin_hard_timeout")) {
>             learn->fin_hard_timeout = atoi(value);
>
> Should't it be const char * ?
>
> Regards
> Neeraj
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20150917/7d71d432/attachment-0002.html>


More information about the discuss mailing list