projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 2:
7922a7b
)
Merge branch 'fix-348' of https://github.com/omor1/fio
author
Jens Axboe
<axboe@fb.com>
Sun, 30 Apr 2017 22:48:24 +0000
(16:48 -0600)
committer
Jens Axboe
<axboe@fb.com>
Sun, 30 Apr 2017 22:48:24 +0000
(16:48 -0600)
os/os-android.h
patch
|
blob
|
blame
|
history
diff --git
a/os/os-android.h
b/os/os-android.h
index 1d11cccde42bdd8b1db35bf016ccb65d8f38ac62..ba599ddd3f1b84aac116b59511997e1a9ea0285c 100644
(file)
--- a/
os/os-android.h
+++ b/
os/os-android.h
@@
-88,14
+88,14
@@
static inline int shmctl (int __shmid, int __cmd, struct shmid_ds *__buf)
static inline int shmget (key_t __key, size_t __size, int __shmflg)
{
int fd,ret;
- char key[11];
-
+ char key
buf
[11];
+
fd = open(ASHMEM_DEVICE, O_RDWR);
if (fd < 0)
return fd;
- sprintf(key,"%d",__key);
- ret = ioctl(fd, ASHMEM_SET_NAME, key);
+ sprintf(key
buf
,"%d",__key);
+ ret = ioctl(fd, ASHMEM_SET_NAME, key
buf
);
if (ret < 0)
goto error;
@@
-104,7
+104,7
@@
static inline int shmget (key_t __key, size_t __size, int __shmflg)
goto error;
return fd;
-
+
error:
close(fd);
return ret;