[rtems commit] score: Allow NULL for SMP lock name
Sebastian Huber
sebh at rtems.org
Fri Mar 6 15:20:09 UTC 2015
Module: rtems
Branch: master
Commit: bf9d387fcba47489a49a097ee916f2d763977190
Changeset: http://git.rtems.org/rtems/commit/?id=bf9d387fcba47489a49a097ee916f2d763977190
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Fri Mar 6 14:40:56 2015 +0100
score: Allow NULL for SMP lock name
---
cpukit/score/include/rtems/score/smplock.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cpukit/score/include/rtems/score/smplock.h b/cpukit/score/include/rtems/score/smplock.h
index 364a722..5eb6ef3 100644
--- a/cpukit/score/include/rtems/score/smplock.h
+++ b/cpukit/score/include/rtems/score/smplock.h
@@ -505,7 +505,7 @@ static inline bool _SMP_lock_Stats_iteration_next(
current = iteration_context->current;
if ( !_Chain_Is_tail( &control->Stats_chain, ¤t->Node ) ) {
- size_t name_len = strlen(current->name);
+ size_t name_len = current->name != NULL ? strlen(current->name) : 0;
valid = true;
More information about the vc
mailing list