Whamcloud - gitweb
git://git.whamcloud.com
/
tools
/
e2fsprogs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
e2fsck/revoke.c: sync kernel's adoption of kmalloc_array()
[tools/e2fsprogs.git]
/
e2fsck
/
jfs_user.h
diff --git
a/e2fsck/jfs_user.h
b/e2fsck/jfs_user.h
index
239ac1d
..
1445c3e
100644
(file)
--- a/
e2fsck/jfs_user.h
+++ b/
e2fsck/jfs_user.h
@@
-92,6
+92,13
@@
typedef struct {
#define kmalloc(len, flags) malloc(len)
#define kfree(p) free(p)
#define kmalloc(len, flags) malloc(len)
#define kfree(p) free(p)
+static inline void *kmalloc_array(unsigned n, unsigned size, int flags)
+{
+ if (n && (~0U)/n < size)
+ return NULL;
+ return malloc(n * size);
+}
+
#define cond_resched() do { } while (0)
#define __init
#define cond_resched() do { } while (0)
#define __init