On 11/28/2014 03:46 PM, Ola Liljedahl wrote:
On 28 November 2014 at 14:41, Bill Fischofer <bill.fischo...@linaro.org> wrote:
ODP supports C and as such all normal C idioms apply.  False is 0 and true
is != false.  I don't see a need to overspecify beyond that.  For ODP
routines that return an odp_bool_t they return 1 for true.
Agree. I was not perfectly clear below.

That is my issue. Why should ODP over-specify 'true' and return exactly 1 for true? Implementation will have to always convert !0 to 1 on
return.

Instead of:
odp_boot_t odp_packet_has_l3(odp_packet_t pkt)
{
        return flags(pkt) & l3_mask;
}

Implementation should do:
odp_boot_t odp_packet_has_l3(odp_packet_t pkt)
{
        return (flags(pkt) & l3_mask) ? 1 : 0;
}

_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to