i have confusion in following code...

if ((p = getDefaultParent(request))) {
        code = DEFAULT_PARENT;
    } else if ((p = getRoundRobinParent(request))) {
        code = ROUNDROBIN_PARENT;
    } else if ((p = getFirstUpParent(request))) {
        code = FIRSTUP_PARENT;
    } else if ((p = getAnyParent(request))) {
        code = ANY_OLD_PARENT;
    }
if (code != HIER_NONE) {
        debug(44, 3) ("peerSelect: %s/%s\n", hier_strings[code], p->host);
        peerAddFwdServer(&ps->servers, p, code);
    }


stmt p = getDefaultParent(request) are assignment stmt
so outcome of if cond is definately 0
in this case 
code will be HIER_NONE.

does it indicate error in code or it has any other purpose?



_____________________________________________________________________
Get your internet connection from the fastest growing digital network.
ICENET
visit our site www.icenet.net

Reply via email to