This is only for debugging purposes. It could be useful for an application
developer if the platform implementation doesn't emit any error messages about
its problems.

Signed-off-by: Zoltan Kiss <[email protected]>
---
 include/odp/api/packet_flags.h            | 3 ++-
 platform/linux-generic/odp_packet_flags.c | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/odp/api/packet_flags.h b/include/odp/api/packet_flags.h
index b1e179e..77239d2 100644
--- a/include/odp/api/packet_flags.h
+++ b/include/odp/api/packet_flags.h
@@ -32,7 +32,8 @@ extern "C" {
  * Checks all error flags at once.
  *
  * @param pkt Packet handle
- * @retval 1 packet has errors
+ * @retval !0 packet has errors (implementation is allowed to return error
+ *           codes for debugging purposes)
  * @retval 0 packet has no errors
  */
 int odp_packet_has_error(odp_packet_t pkt);
diff --git a/platform/linux-generic/odp_packet_flags.c 
b/platform/linux-generic/odp_packet_flags.c
index ab3d12f..bcd44fb 100644
--- a/platform/linux-generic/odp_packet_flags.c
+++ b/platform/linux-generic/odp_packet_flags.c
@@ -10,7 +10,7 @@
 
 int odp_packet_has_error(odp_packet_t pkt)
 {
-       return (odp_packet_hdr(pkt)->error_flags.all != 0);
+       return odp_packet_hdr(pkt)->error_flags.all;
 }
 
 /* Get Input Flags */
-- 
1.9.1


_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to