[ovs-discuss] Input argument to atoi

neeraj mehta mehtaneeraj07 at gmail.com
Tue Sep 15 18:22:20 UTC 2015


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/20150915/0381a909/attachment-0002.html>


More information about the discuss mailing list