Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1061)

Unified Diff: fusl/src/unistd/getlogin_r.c

Issue 1714623002: [fusl] clang-format fusl (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: headers too Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: fusl/src/unistd/getlogin_r.c
diff --git a/fusl/src/unistd/getlogin_r.c b/fusl/src/unistd/getlogin_r.c
index 53866c6dce4077d8a53ba118a6460c2f2e6f55ee..54a356516bc93170c47d9d2eab6c07ddd76ba0ed 100644
--- a/fusl/src/unistd/getlogin_r.c
+++ b/fusl/src/unistd/getlogin_r.c
@@ -2,11 +2,12 @@
#include <string.h>
#include <errno.h>
-int getlogin_r(char *name, size_t size)
-{
- char *logname = getlogin();
- if (!logname) return ENXIO; /* or...? */
- if (strlen(logname) >= size) return ERANGE;
- strcpy(name, logname);
- return 0;
+int getlogin_r(char* name, size_t size) {
+ char* logname = getlogin();
+ if (!logname)
+ return ENXIO; /* or...? */
+ if (strlen(logname) >= size)
+ return ERANGE;
+ strcpy(name, logname);
+ return 0;
}

Powered by Google App Engine
This is Rietveld 408576698