From 92471aead2e38bcddaf06afd264275b98781e3da Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 8 Nov 2011 07:53:06 +1100 Subject: [PATCH] Log: better way to check for -1 long portably --- ArduCopter/Log.pde | 2 +- ArduPlane/Log.pde | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ArduCopter/Log.pde b/ArduCopter/Log.pde index 5a2d34edd1..462ad73529 100644 --- a/ArduCopter/Log.pde +++ b/ArduCopter/Log.pde @@ -347,7 +347,7 @@ static int find_last_log_page(int bottom_page) //Serial.printf("look page:%d, check:%d\n", look_page, check); - if(check == (int32_t)~0) + if(check == -1L) top_page = look_page; else bottom_page = look_page; diff --git a/ArduPlane/Log.pde b/ArduPlane/Log.pde index 90bb19b3ea..59c9971c65 100644 --- a/ArduPlane/Log.pde +++ b/ArduPlane/Log.pde @@ -319,7 +319,7 @@ static int find_last_log_page(int bottom_page) look_page = (top_page + bottom_page) / 2; DataFlash.StartRead(look_page); check = DataFlash.ReadLong(); - if(check == (int32_t)~0) + if(check == -1L) top_page = look_page; else bottom_page = look_page;