diff mbox

tests: api: timer: Fix operator precedence

Message ID 1402141387-22058-2-git-send-email-taras.kondratiuk@linaro.org
State Accepted
Commit 65c132be59c07700315f13a69c39b8a32d353a4c
Headers show

Commit Message

Taras Kondratiuk June 7, 2014, 11:43 a.m. UTC
'==' has higher priority than '=', so 'buf' gets a result of comparison
instead of a buffer.

Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
---
 test/api_test/odp_timer_ping.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Maxim Uvarov June 10, 2014, 6:40 p.m. UTC | #1
Merged, thanks!

Maxim.

On 06/07/2014 04:43 AM, Taras Kondratiuk wrote:
> '==' has higher priority than '=', so 'buf' gets a result of comparison
> instead of a buffer.
>
> Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
> ---
>   test/api_test/odp_timer_ping.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/test/api_test/odp_timer_ping.c b/test/api_test/odp_timer_ping.c
> index 8b297d8..7f2d1c4 100644
> --- a/test/api_test/odp_timer_ping.c
> +++ b/test/api_test/odp_timer_ping.c
> @@ -188,7 +188,7 @@ static int send_ping_request(struct sockaddr_in *addr)
>   							ODP_BUFFER_INVALID);
>   
>   		/* wait for timeout event */
> -		while ((buf = odp_queue_deq(queue) == ODP_BUFFER_INVALID)) {
> +		while ((buf = odp_queue_deq(queue)) == ODP_BUFFER_INVALID) {
>   			/* flag true means ack rxvd.. a cruel hack as I
>   			 * am confused on method to get away from while
>   			 * loop in case of ack rxvd..
diff mbox

Patch

diff --git a/test/api_test/odp_timer_ping.c b/test/api_test/odp_timer_ping.c
index 8b297d8..7f2d1c4 100644
--- a/test/api_test/odp_timer_ping.c
+++ b/test/api_test/odp_timer_ping.c
@@ -188,7 +188,7 @@  static int send_ping_request(struct sockaddr_in *addr)
 							ODP_BUFFER_INVALID);
 
 		/* wait for timeout event */
-		while ((buf = odp_queue_deq(queue) == ODP_BUFFER_INVALID)) {
+		while ((buf = odp_queue_deq(queue)) == ODP_BUFFER_INVALID) {
 			/* flag true means ack rxvd.. a cruel hack as I
 			 * am confused on method to get away from while
 			 * loop in case of ack rxvd..