summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSitsofe Wheeler <sitsofe@yahoo.com>2020-07-26 07:14:15 +0100
committerSitsofe Wheeler <sitsofe@yahoo.com>2020-07-26 11:55:10 +0100
commit400ff0fb4bd5d3ecbff5fa4e783ea4d3e52817f1 (patch)
treeef01c3feb53c0048dde18849046027928227d322
parent90d06f94de5d93a54e3ada5b0bd64455ff013fd0 (diff)
downloadfio-400ff0fb4bd5d3ecbff5fa4e783ea4d3e52817f1.tar.gz
fio-400ff0fb4bd5d3ecbff5fa4e783ea4d3e52817f1.tar.bz2
memory: fix incorrect pointer comparison when freeing cuda memory
This fixes the following warning spotted by gcc 7: memory.c: In function ‘free_mem_cudamalloc’: memory.c:277:22: error: comparison between pointer and integer [-Werror] if (td->dev_mem_ptr != NULL) ^~ Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
-rw-r--r--memory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/memory.c b/memory.c
index 5f0225f7..6cf73333 100644
--- a/memory.c
+++ b/memory.c
@@ -274,7 +274,7 @@ static int alloc_mem_cudamalloc(struct thread_data *td, size_t total_mem)
static void free_mem_cudamalloc(struct thread_data *td)
{
#ifdef CONFIG_CUDA
- if (td->dev_mem_ptr != NULL)
+ if (td->dev_mem_ptr)
cuMemFree(td->dev_mem_ptr);
if (cuCtxDestroy(td->cu_ctx) != CUDA_SUCCESS)