]> git.droids-corp.org - dpdk.git/blobdiff - drivers/net/qede/base/bcm_osal.c
doc: use SPDX tag for bnx2x guide
[dpdk.git] / drivers / net / qede / base / bcm_osal.c
index 693328f117c7983980e6b62d4026155c6a8f0c45..9915df44f5d94df7fd7812a3cc25e6c4e5634a61 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();