You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/10/31 18:19:37 UTC

[GitHub] ccollins476ad commented on a change in pull request #1490: Hal flash write protection

ccollins476ad commented on a change in pull request #1490: Hal flash write protection
URL: https://github.com/apache/mynewt-core/pull/1490#discussion_r229812249
 
 

 ##########
 File path: hw/hal/src/hal_flash.c
 ##########
 @@ -165,6 +167,10 @@ hal_flash_write(uint8_t id, uint32_t address, const void *src,
         return -1;
     }
 
+    if (protected_flash[id / 8] &= (1 << (id & 7))) {
 
 Review comment:
   This looks a bit odd to me.  Did you intend to modify the `protected_flash` array here?  (i.e., should this expression use `&` rather than `&=`?).  This comment applies to a few other uses of `&=` in this file.

----------------------------------------------------------------
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