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

Unified Diff: fusl/src/legacy/ulimit.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/legacy/ulimit.c
diff --git a/fusl/src/legacy/ulimit.c b/fusl/src/legacy/ulimit.c
index 1f59e8e619f5588fdd0a1cf3bd394729b3d0192c..dfd77970461502497008b6273180b015218866d6 100644
--- a/fusl/src/legacy/ulimit.c
+++ b/fusl/src/legacy/ulimit.c
@@ -2,18 +2,18 @@
#include <ulimit.h>
#include <stdarg.h>
-long ulimit(int cmd, ...)
-{
- struct rlimit rl;
- getrlimit(RLIMIT_FSIZE, &rl);
- if (cmd == UL_SETFSIZE) {
- long val;
- va_list ap;
- va_start(ap, cmd);
- val = va_arg(ap, long);
- va_end(ap);
- rl.rlim_cur = 512ULL * val;
- if (setrlimit(RLIMIT_FSIZE, &rl)) return -1;
- }
- return rl.rlim_cur / 512;
+long ulimit(int cmd, ...) {
+ struct rlimit rl;
+ getrlimit(RLIMIT_FSIZE, &rl);
+ if (cmd == UL_SETFSIZE) {
+ long val;
+ va_list ap;
+ va_start(ap, cmd);
+ val = va_arg(ap, long);
+ va_end(ap);
+ rl.rlim_cur = 512ULL * val;
+ if (setrlimit(RLIMIT_FSIZE, &rl))
+ return -1;
+ }
+ return rl.rlim_cur / 512;
}

Powered by Google App Engine
This is Rietveld 408576698