git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
change strncmp(...) != 0 to STRNEQLEN(...)
[libguestfs.git]
/
fish
/
rc.c
diff --git
a/fish/rc.c
b/fish/rc.c
index
5d64c70
..
182c4f4
100644
(file)
--- a/
fish/rc.c
+++ b/
fish/rc.c
@@
-98,7
+98,8
@@
receive_stdout (int s)
else {
/* Extract the transferred file descriptor from the control data */
else {
/* Extract the transferred file descriptor from the control data */
- int fd = *(int *)CMSG_DATA (h);
+ unsigned char *data = CMSG_DATA (h);
+ int fd = *(int *)data;
/* Duplicate the received file descriptor to stdout */
dup2 (fd, STDOUT_FILENO);
/* Duplicate the received file descriptor to stdout */
dup2 (fd, STDOUT_FILENO);
@@
-146,7
+147,8
@@
send_stdout (int s)
msg.msg_controllen = controllen;
/* Add STDOUT to the control data */
msg.msg_controllen = controllen;
/* Add STDOUT to the control data */
- *(int *)CMSG_DATA (cmptr) = STDOUT_FILENO;
+ unsigned char *data = CMSG_DATA (cmptr);
+ *(int *)data = STDOUT_FILENO;
if (sendmsg (s, &msg, 0) != 1) {
perror ("sendmsg stdout fd");
if (sendmsg (s, &msg, 0) != 1) {
perror ("sendmsg stdout fd");