While we're here, re-indent properly. :D
This commit was SVN r6283.
Этот коммит содержится в:
родитель
ff41c82259
Коммит
fe76370cd3
@ -109,18 +109,18 @@ int orte_sys_info(void)
|
|||||||
/* get the name of the user */
|
/* get the name of the user */
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
uid = getuid();
|
uid = getuid();
|
||||||
if ((pwdent = getpwuid(uid)) != 0) {
|
if ((pwdent = getpwuid(uid)) != 0) {
|
||||||
orte_system_info.user = strdup(pwdent->pw_name);
|
orte_system_info.user = strdup(pwdent->pw_name);
|
||||||
} else {
|
} else {
|
||||||
if (0 > asprintf(&(orte_system_info.user), "%d", uid)) {
|
if (0 > asprintf(&(orte_system_info.user), "%d", uid)) {
|
||||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if (!GetUserName(info_buf, &info_buf_length)) {
|
if (!GetUserName(info_buf, &info_buf_length)) {
|
||||||
orte_system_info.user = strdup("unknown");
|
orte_system_info.user = strdup("unknown");
|
||||||
} else {
|
} else {
|
||||||
orte_system_info.user = strdup(info_buf);
|
orte_system_info.user = strdup(info_buf);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user