libafscp: NULL return value not pointer
authorSimon Wilkinson <sxw@your-file-system.com>
Tue, 26 Feb 2013 11:52:01 +0000 (11:52 +0000)
committerDerrick Brashear <shadow@your-file-system.com>
Tue, 26 Feb 2013 15:22:07 +0000 (07:22 -0800)
When afscp_FindCallBack sets its return-by-reference value to NULL,
it should do so to the value itself, not the pointer to it.

Caught by coverity (#988419)

Change-Id: I6b227465d7aa945d871b2db1cc4d1357cae493d3
Reviewed-on: http://gerrit.openafs.org/9266
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

src/libafscp/afscp_callback.c

index 213cc8b..d3aebda 100644 (file)
@@ -112,7 +112,7 @@ afscp_FindCallBack(const struct afscp_venusfid *f,
     time_t now;
     struct afscp_venusfid fid;
 
-    ret = NULL;
+    *ret = NULL;
 
     time(&now);
     for (i = 0; i < afscp_maxcallbacks; i++) {