From: Simon Wilkinson Date: Tue, 12 Feb 2013 14:07:10 +0000 (+0000) Subject: usd: Can't call usd_FileStandard* with NULL X-Git-Tag: openafs-stable-1_8_0pre1~1526 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=ea24520b3152e4197b2f1e1c3f3dd937340660a6 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 --- diff --git a/src/usd/usd_file.c b/src/usd/usd_file.c index f66df08..06c6a4c 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;