mynewt-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] vrahane closed pull request #1413: drivers/bq27z561: remove assert in driver
Date Fri, 21 Sep 2018 23:30:42 GMT
vrahane closed pull request #1413: drivers/bq27z561: remove assert in driver
URL: https://github.com/apache/mynewt-core/pull/1413
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/hw/drivers/bq27z561/src/bq27z561.c b/hw/drivers/bq27z561/src/bq27z561.c
index 28bd0a2015..d65ee24554 100644
--- a/hw/drivers/bq27z561/src/bq27z561.c
+++ b/hw/drivers/bq27z561/src/bq27z561.c
@@ -17,7 +17,6 @@
  * under the License.
  */
 
-#include <assert.h>
 #include <math.h>
 #include <string.h>
 
@@ -1079,7 +1078,7 @@ bq27z561_battery_property_get(struct battery_driver *driver,
             property->bp_value.bpv_temperature = val.bpv_i8;
     } else {
         rc = -1;
-        assert(0);
+        return rc;
     }
     if (rc == 0) {
         property->bp_valid = 1;
@@ -1138,7 +1137,6 @@ bq27z561_battery_property_set(struct battery_driver *driver,
                     (int16_t)property->bp_value.bpv_temperature);
     } else {
         rc = -1;
-        assert(0);
     }
     return rc;
 }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message