Coding style change
This commit is contained in:
+4
-4
@@ -10,7 +10,7 @@ void stdin_read_cb(struct IOMux *mux, struct IOMuxFD *fd, unsigned int event)
|
||||
{
|
||||
char buf[4096];
|
||||
ssize_t len = read(fd->fd, buf, sizeof buf);
|
||||
if(len <= 0) {
|
||||
if (len <= 0) {
|
||||
perror("read");
|
||||
fprintf(stderr,"Unregister stdin fd %d\n", fd->fd);
|
||||
iomux_unregister_fd(mux, fd);
|
||||
@@ -25,7 +25,7 @@ void pipe_read_cb(struct IOMux *mux, struct IOMuxFD *fd, unsigned int event)
|
||||
{
|
||||
char buf[4095];
|
||||
ssize_t len = read(fd->fd, buf, sizeof buf);
|
||||
if(len <= 0) {
|
||||
if (len <= 0) {
|
||||
perror("pipe read");
|
||||
printf("Unregister pipe fd %d [stdout]\n", fd->fd);
|
||||
fprintf(stderr,"Unregister pipe fd %d[stderr]\n", fd->fd);
|
||||
@@ -72,10 +72,10 @@ int main(int argc, char *argv[])
|
||||
|
||||
|
||||
rc = iomux_register_fd(mux1, &fd1);
|
||||
if(rc != 0)
|
||||
if (rc != 0)
|
||||
printf("Cannot register fd1: %s\n", strerror(rc));
|
||||
rc = iomux_register_fd(mux2, &fd2);
|
||||
if(rc != 0)
|
||||
if (rc != 0)
|
||||
printf("Cannot register fdw: %s\n", strerror(rc));
|
||||
pthread_create(&tid,NULL,writer,mux2);
|
||||
iomux_run(mux1);
|
||||
|
||||
Reference in New Issue
Block a user