doc: use SPDX tag for bnx2x guide
[dpdk.git] / drivers / net / qede / base / bcm_osal.c
index 693328f..9915df4 100644 (file)
@@ -128,7 +128,7 @@ void *osal_dma_alloc_coherent(struct ecore_dev *p_dev,
        }
 
        OSAL_MEM_ZERO(mz_name, sizeof(*mz_name));
-       snprintf(mz_name, sizeof(mz_name) - 1, "%lx",
+       snprintf(mz_name, sizeof(mz_name), "%lx",
                                        (unsigned long)rte_get_timer_cycles());
        if (core_id == (unsigned int)LCORE_ID_ANY)
                core_id = rte_get_master_lcore();
@@ -167,7 +167,7 @@ void *osal_dma_alloc_coherent_aligned(struct ecore_dev *p_dev,
        }
 
        OSAL_MEM_ZERO(mz_name, sizeof(*mz_name));
-       snprintf(mz_name, sizeof(mz_name) - 1, "%lx",
+       snprintf(mz_name, sizeof(mz_name), "%lx",
                                        (unsigned long)rte_get_timer_cycles());
        if (core_id == (unsigned int)LCORE_ID_ANY)
                core_id = rte_get_master_lcore();