converted frometext* to use gettoken() converted: result = foo(); if (result != DNS_R_SUCCESS) return (result); to RETERR(foo());