@@ -2728,32 +2728,34 @@ BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue )
27282728 UBaseType_t ux ;
27292729
27302730 configASSERT ( xQueue );
2731- configASSERT ( pcQueueName );
27322731
27332732 QueueRegistryItem_t * pxEntryToWrite = NULL ;
27342733
2735- /* See if there is an empty space in the registry. A NULL name denotes
2736- * a free slot. */
2737- for ( ux = ( UBaseType_t ) 0U ; ux < ( UBaseType_t ) configQUEUE_REGISTRY_SIZE ; ux ++ )
2734+ if ( pcQueueName != NULL )
27382735 {
2739- /* Replace an existing entry if the queue is already in the registry. */
2740- if ( xQueueRegistry [ ux ].xHandle == xQueue )
2741- {
2742- pxEntryToWrite = & ( xQueueRegistry [ ux ] );
2743- break ;
2744- }
2745- /* Otherwise, store in the next empty location */
2746- else if ( ( NULL == pxEntryToWrite ) && ( xQueueRegistry [ ux ].pcQueueName == NULL ) )
2736+ /* See if there is an empty space in the registry. A NULL name denotes
2737+ * a free slot. */
2738+ for ( ux = ( UBaseType_t ) 0U ; ux < ( UBaseType_t ) configQUEUE_REGISTRY_SIZE ; ux ++ )
27472739 {
2748- pxEntryToWrite = & ( xQueueRegistry [ ux ] );
2749- }
2750- else
2751- {
2752- mtCOVERAGE_TEST_MARKER ();
2740+ /* Replace an existing entry if the queue is already in the registry. */
2741+ if ( xQueue == xQueueRegistry [ ux ].xHandle )
2742+ {
2743+ pxEntryToWrite = & ( xQueueRegistry [ ux ] );
2744+ break ;
2745+ }
2746+ /* Otherwise, store in the next empty location */
2747+ else if ( ( pxEntryToWrite == NULL ) && ( xQueueRegistry [ ux ].pcQueueName == NULL ) )
2748+ {
2749+ pxEntryToWrite = & ( xQueueRegistry [ ux ] );
2750+ }
2751+ else
2752+ {
2753+ mtCOVERAGE_TEST_MARKER ();
2754+ }
27532755 }
27542756 }
27552757
2756- if ( NULL != pxEntryToWrite )
2758+ if ( pxEntryToWrite == NULL )
27572759 {
27582760 /* Store the information on this queue. */
27592761 pxEntryToWrite -> pcQueueName = pcQueueName ;
0 commit comments