From ea24520b3152e4197b2f1e1c3f3dd937340660a6 Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Tue, 12 Feb 2013 14:07:10 +0000 Subject: [PATCH] usd: Can't call usd_FileStandard* with NULL It doesn't make sense to call usd_FileStandard{Input,Output} with a NULL usd_handle_t (and doing so would crash later in the function), so don't check for attempts to do so. Caught by clang-analyzer Change-Id: I03c0b627056108fe0d6f78d8028323cc4ed74758 Reviewed-on: http://gerrit.openafs.org/9151 Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear Tested-by: BuildBot --- src/usd/usd_file.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/usd/usd_file.c b/src/usd/usd_file.c index f66df08ac..06c6a4cd8 100644 --- a/src/usd/usd_file.c +++ b/src/usd/usd_file.c @@ -392,9 +392,6 @@ usd_FileStandardInput(usd_handle_t * usdP) { usd_handle_t usd; - if (usdP) - *usdP = NULL; - usd = calloc(1, sizeof(*usd)); usd->handle = (void *)((unsigned long)0); usd->read = usd_FileRead; @@ -420,9 +417,6 @@ usd_FileStandardOutput(usd_handle_t * usdP) { usd_handle_t usd; - if (usdP) - *usdP = NULL; - usd = calloc(1, sizeof(*usd)); usd->handle = (void *)((unsigned long)1); usd->read = usd_FileRead; -- 2.39.5