sjanc commented on a change in pull request #856:
URL: https://github.com/apache/mynewt-nimble/pull/856#discussion_r481012643
##########
File path: nimble/controller/src/ble_ll.c
##########
@@ -1682,15 +1663,17 @@ ble_ll_init(void)
features |= BLE_LL_FEAT_ISO_HOST_SUPPORT;
#endif
+ lldata->ll_supp_features = features;
+
/* Initialize random number generation */
ble_ll_rand_init();
-
- /* XXX: This really doesn't belong here, as the address probably has not
- * been set yet.
- */
- ble_ll_seed_prng();
-
- lldata->ll_supp_features = features;
+ /* Start the random number generator */
+ ble_ll_rand_start();
+ /* Use the random number generator to seed the STDLIBs pseudo-number
+ * generator */
+ unsigned seed;
Review comment:
good catch!
nitpick : declare seed at function top :)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]