* Translate the error
*/
- (error_init_done || pthread_once(&error_init_once, init_once));
+ if ( !error_init_done )
+ pthread_once(&error_init_once, init_once);
code = (afs_int32) errorCode;
*errorTextP = error_message(code);
rc = 1;
}
rc = 1;
-fail_GetDatabaseServerRPC:
-
if (st != NULL) {
*st = tst;
}
afs_admin_iterator_p iter = (afs_admin_iterator_p) malloc(sizeof(afs_admin_iterator_t));
database_server_get_p serv = (database_server_get_p) calloc(1, sizeof(database_server_get_t));
char copyCell[MAXCELLCHARS];
- int mutex_inited = 0;
/*
* Validate arguments
int rc = 0;
afs_status_t tst = 0;
afs_admin_iterator_p iter = (afs_admin_iterator_p) iterationId;
- int iter_locked = 0;
if (iter == NULL) {
tst = ADMITERATORNULL;
int rc = 0;
afs_status_t tst = 0;
int mutex_inited = 0;
- int attr_inited = 0;
int add_item_cond_inited = 0;
int remove_item_cond_inited = 0;
int rc = 0;
afs_status_t tst = 0;
rpc_stat_get_p t = (rpc_stat_get_p) rpc_specific;
- afs_uint32 index = t->index;
t->stats[slot].clientVersion = t->clientVersion;
t->stats[slot].serverVersion = t->serverVersion;
int rc = 0;
afs_status_t tst = 0;
int code;
- int len;
if (handle == NULL) {
tst = ADMRXDEBUGHANDLENULL;
int rc = 0;
afs_status_t tst = 0;
struct rx_debugStats tstats;
- int code;
if (handle == NULL) {
tst = ADMRXDEBUGHANDLENULL;
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <stdlib.h>
#ifdef AFS_NT40_ENV
#include <io.h>
+#else
+#include <unistd.h>
#endif
int rc = 0;
afs_status_t tst = 0;
key_get_p key = (key_get_p) rpc_specific;
- char *ptr = (char *) &key->key[slot];
struct bozo_keyInfo keyInfo;
tst = BOZO_ListKeys(key->server, key->next++,
}
if ((time.mask & BOS_RESTART_TIME_HOUR) &&
- (time.hour < 0) || (time.hour > 23)) {
+ ((time.hour < 0) || (time.hour > 23))) {
tst = ADMBOSHOURINVALID;
goto fail_bos_ExecutableRestartTimeSet;
}
if ((time.mask & BOS_RESTART_TIME_MINUTE) &&
- (time.min < 0) || (time.min > 60)) {
+ ((time.min < 0) || (time.min > 60))) {
tst = ADMBOSMINUTEINVALID;
goto fail_bos_ExecutableRestartTimeSet;
}
if ((time.mask & BOS_RESTART_TIME_SECOND) &&
- (time.sec < 0) || (time.sec > 60)) {
+ ((time.sec < 0) || (time.sec > 60))) {
tst = ADMBOSSECONDINVALID;
goto fail_bos_ExecutableRestartTimeSet;
}
if ((time.mask & BOS_RESTART_TIME_DAY) &&
- (time.day < 0) || (time.day > 6)) {
+ ((time.day < 0) || (time.day > 6))) {
tst = ADMBOSDAYINVALID;
goto fail_bos_ExecutableRestartTimeSet;
}
int rc = 0;
afs_status_t tst = 0;
bos_server_p b_handle = (bos_server_p) serverHandle;
- struct rx_call *tcall;
+ struct rx_call *tcall = NULL;
afs_int32 error;
char buffer;
int have_call = 0;
int have_volume = 0;
unsigned int part = 0;
int try_to_stop_fileserver = 0;
- int stopped_fileserver = 0;
bos_ProcessType_t procType;
bos_ProcessInfo_t procInfo;
FILE *log = NULL;
goto fail_bos_Salvage;
}
- while (poll_rc = bos_ProcessInfoGet(serverHandle, "salvage-tmp", &procType,
- &procInfo, &tst)) {
+ while ((poll_rc = bos_ProcessInfoGet(serverHandle, "salvage-tmp", &procType,
+ &procInfo, &tst))) {
sleep(5);
}
#include <afs/venus.h>
#include <errno.h>
#include <strings.h>
+#include <unistd.h>
#endif
#include <string.h>
#include <afs/kautils.h>
goto fail_afsclient_LocalCellGet;
}
- if (tst = afsconf_GetLocalCell(tdir, cellName, MAXCELLCHARS)) {
+ if ((tst = afsconf_GetLocalCell(tdir, cellName, MAXCELLCHARS))) {
goto fail_afsclient_LocalCellGet;
}
goto fail_afsclient_MountPointCreate;
}
#else
- if (tst = symlink(space, directory)) {
+ if ((tst = symlink(space, directory))) {
goto fail_afsclient_MountPointCreate;
}
#endif
char *ptr;
Acl_t cur_acl;
char cur_user[64];
- int cur_user_acl;
+ int cur_user_acl = 0;
int i;
char tmp[64+35];
int is_dfs;
* file.
*/
- is_dfs = sscanf(old_acl_string, "%d dfs:%d %s", &cur_acl.nplus, &cur_acl.dfs, &cur_acl.cell);
+ is_dfs = sscanf(old_acl_string, "%d dfs:%d %s", &cur_acl.nplus, &cur_acl.dfs, cur_acl.cell);
ptr = strchr(old_acl_string, '\n');
ptr++;
sscanf(ptr, "%d", &cur_acl.nminus);
*/
for(i=0;i<(cur_acl.nplus + cur_acl.nminus);i++) {
- sscanf(ptr, "%s%d\n", &cur_user, &cur_user_acl);
+ sscanf(ptr, "%s%d\n", cur_user, &cur_user_acl);
/*
* Skip the entry for the user we are replacing/adding
*/
int rc = 0;
afs_status_t tst = 0;
- (client_init || pthread_once(&client_init_once, client_once));
+ if ( !client_init )
+ pthread_once(&client_init_once, client_once);
#ifdef AFS_NT40_ENV
if (afs_winsockInit() < 0) {
goto fail_afsclient_Init;
}
- if (tst = ka_CellConfig((char *)AFSDIR_CLIENT_ETC_DIRPATH)) {
+ if ((tst = ka_CellConfig((char *)AFSDIR_CLIENT_ETC_DIRPATH))) {
goto fail_afsclient_Init;
}
}
rc = 1;
-fail_GetServerRPC:
-
if (st != NULL) {
*st = tst;
}