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

Unified Diff: fusl/src/malloc/calloc.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/malloc/calloc.c
diff --git a/fusl/src/malloc/calloc.c b/fusl/src/malloc/calloc.c
index 436c0b034869a409cdc24d63adbd9be04ac5ff7e..fc4c762c149a2e06dbb54d2e8fbc65ab7f491715 100644
--- a/fusl/src/malloc/calloc.c
+++ b/fusl/src/malloc/calloc.c
@@ -1,13 +1,12 @@
#include <stdlib.h>
#include <errno.h>
-void *__malloc0(size_t);
+void* __malloc0(size_t);
-void *calloc(size_t m, size_t n)
-{
- if (n && m > (size_t)-1/n) {
- errno = ENOMEM;
- return 0;
- }
- return __malloc0(n * m);
+void* calloc(size_t m, size_t n) {
+ if (n && m > (size_t)-1 / n) {
+ errno = ENOMEM;
+ return 0;
+ }
+ return __malloc0(n * m);
}

Powered by Google App Engine
This is Rietveld 408576698