checksrc: move open braces to comply with function declaration style

This commit is contained in:
Daniel Stenberg 2016-11-23 08:49:04 +01:00
parent 80e7cfeb87
commit 6832c1d4b2
13 changed files with 78 additions and 65 deletions

View file

@ -138,48 +138,48 @@ static char *vms_getenv(const char *envvar)
static struct passwd vms_passwd_cache;
static struct passwd * vms_getpwuid(uid_t uid) {
struct passwd * my_passwd;
static struct passwd * vms_getpwuid(uid_t uid)
{
struct passwd * my_passwd;
/* Hack needed to support 64 bit builds, decc_getpwnam is 32 bit only */
#ifdef __DECC
# if __INITIAL_POINTER_SIZE
__char_ptr32 unix_path;
__char_ptr32 unix_path;
# else
char *unix_path;
char *unix_path;
# endif
#else
char *unix_path;
char *unix_path;
#endif
my_passwd = decc_getpwuid(uid);
if(my_passwd == NULL) {
return my_passwd;
}
my_passwd = decc_getpwuid(uid);
if(my_passwd == NULL) {
return my_passwd;
}
unix_path = vms_translate_path(my_passwd->pw_dir);
unix_path = vms_translate_path(my_passwd->pw_dir);
if((long)unix_path <= 0) {
/* We can not translate it, so return the original string */
return my_passwd;
}
if((long)unix_path <= 0) {
/* We can not translate it, so return the original string */
return my_passwd;
}
/* If no changes needed just return it */
if(unix_path == my_passwd->pw_dir) {
return my_passwd;
}
/* If no changes needed just return it */
if(unix_path == my_passwd->pw_dir) {
return my_passwd;
}
/* Need to copy the structure returned */
/* Since curl is only using pw_dir, no need to fix up *
/* the pw_shell when running under Bash */
vms_passwd_cache.pw_name = my_passwd->pw_name;
vms_passwd_cache.pw_uid = my_passwd->pw_uid;
vms_passwd_cache.pw_gid = my_passwd->pw_uid;
vms_passwd_cache.pw_dir = unix_path;
vms_passwd_cache.pw_shell = my_passwd->pw_shell;
/* Need to copy the structure returned */
/* Since curl is only using pw_dir, no need to fix up */
/* the pw_shell when running under Bash */
vms_passwd_cache.pw_name = my_passwd->pw_name;
vms_passwd_cache.pw_uid = my_passwd->pw_uid;
vms_passwd_cache.pw_gid = my_passwd->pw_uid;
vms_passwd_cache.pw_dir = unix_path;
vms_passwd_cache.pw_shell = my_passwd->pw_shell;
return &vms_passwd_cache;
return &vms_passwd_cache;
}
#ifdef __DECC