Remove some more warnings from the ubik/ directory
- Remove a dangling else case from an if statement
- Prototype ubik_dprint_25
- Don't do (a || b()) - it's horrible, and causes warnings!
Replace with if (!a) b();
Reviewed-on: http://gerrit.openafs.org/504
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
return EBADF;
tfd = fdcache;
for (i = 0; i < MAXFDCACHE; i++, tfd++) {
- if (tfd->fd == afd)
+ if (tfd->fd == afd) {
if (tfd->fileID != -10000) {
tfd->refCount--;
return 0;
tfd->fd = -1;
break;
}
+ }
}
return close(afd);
}
extern void ubik_vprint(const char *format, va_list ap);
extern void ubik_print(const char *format, ...);
extern void ubik_dprint(const char *format, ...);
+extern void ubik_dprint_25(const char *format, ...);
/*\}*/
#endif /* UBIK_INTERNALS */
#ifdef AFS_PTHREAD_ENV
afs_uint32 state;
- (called_afs_random_once || pthread_once(&random_once, afs_random_once));
+ if (!called_afs_random_once)
+ pthread_once(&random_once, afs_random_once);
+
state = (afs_uint32) pthread_getspecific(random_number_key);
#else
static afs_uint32 state = 0;