]> rtime.felk.cvut.cz Git - lincan.git/blobdiff - lincan/src/write_rtl.c
LinCAN sources go through big white-space cleanup.
[lincan.git] / lincan / src / write_rtl.c
index ce54cb5b1a5f51b61ccfb45d66a88a5470389a58..1b8e869f2a8fac7d6550a24369e726bbaec6758b 100644 (file)
@@ -80,7 +80,7 @@ ssize_t can_write_rtl_posix(struct rtl_file *fptr, const char *buffer,
        /* If the output buffer is full, return immediately in case O_NONBLOCK
         * has been specified or loop until space becomes available.
         */
        /* If the output buffer is full, return immediately in case O_NONBLOCK
         * has been specified or loop until space becomes available.
         */
-       if ((ret=canque_get_inslot4id(qends, &qedge, &slot, 
+       if ((ret=canque_get_inslot4id(qends, &qedge, &slot,
                        0, msg_buff->id, 0))<0){
                DEBUGMSG("Buffer is full\n");
                if(ret < -1)
                        0, msg_buff->id, 0))<0){
                DEBUGMSG("Buffer is full\n");
                if(ret < -1)
@@ -89,11 +89,11 @@ ssize_t can_write_rtl_posix(struct rtl_file *fptr, const char *buffer,
                if (fptr->f_flags & O_NONBLOCK)
                        return -EAGAIN;
 
                if (fptr->f_flags & O_NONBLOCK)
                        return -EAGAIN;
 
-               ret=canque_get_inslot4id_wait_rtl(qends, &qedge, &slot, 
+               ret=canque_get_inslot4id_wait_rtl(qends, &qedge, &slot,
                                                0, msg_buff->id, 0);
                if (ret == -1)
                        return -EINTR;
                                                0, msg_buff->id, 0);
                if (ret == -1)
                        return -EINTR;
-               
+
                if(ret<0) {
                        return -EIO;
                }
                if(ret<0) {
                        return -EIO;
                }
@@ -103,7 +103,7 @@ ssize_t can_write_rtl_posix(struct rtl_file *fptr, const char *buffer,
        canque_put_inslot(qends, qedge, slot);
        bytes_to_copy = length-sizeof(struct canmsg_t);
 
        canque_put_inslot(qends, qedge, slot);
        bytes_to_copy = length-sizeof(struct canmsg_t);
 
-       /* 
+       /*
         * Try to send more messages
         */
        while (bytes_to_copy >= sizeof(struct canmsg_t)) {
         * Try to send more messages
         */
        while (bytes_to_copy >= sizeof(struct canmsg_t)) {
@@ -115,7 +115,7 @@ ssize_t can_write_rtl_posix(struct rtl_file *fptr, const char *buffer,
                /* has been dependent on "extended" option */
 
                /* Get slot */
                /* has been dependent on "extended" option */
 
                /* Get slot */
-               if(canque_get_inslot4id(qends, &qedge, &slot, 
+               if(canque_get_inslot4id(qends, &qedge, &slot,
                        0, msg_buff->id, 0) < 0) break;
                slot->msg=*(msg_buff++);
                slot->msg.flags=msg_flags;
                        0, msg_buff->id, 0) < 0) break;
                slot->msg=*(msg_buff++);
                slot->msg.flags=msg_flags;
@@ -126,6 +126,6 @@ ssize_t can_write_rtl_posix(struct rtl_file *fptr, const char *buffer,
                canque_sync_wait_rtl(qends, qedge);
        }
        return length-bytes_to_copy;
                canque_sync_wait_rtl(qends, qedge);
        }
        return length-bytes_to_copy;
-}      
+}
 
 #endif /*CAN_WITH_RTL*/
 
 #endif /*CAN_WITH_RTL*/