diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-09-27 18:17:17 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-09-27 18:17:17 +0000 |
commit | ee0d07151a144a8425d8cfd0740098d1b76711c2 (patch) | |
tree | 1182bba0160dcef874e3b4afd801b0dbb4f63594 /os/io/mac.c | |
parent | 4c8314f8044617197c73e6603c21a1ef8cc5470a (diff) | |
download | ChibiOS-ee0d07151a144a8425d8cfd0740098d1b76711c2.tar.gz ChibiOS-ee0d07151a144a8425d8cfd0740098d1b76711c2.tar.bz2 ChibiOS-ee0d07151a144a8425d8cfd0740098d1b76711c2.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1191 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/io/mac.c')
-rw-r--r-- | os/io/mac.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/os/io/mac.c b/os/io/mac.c index d7c20df05..c9ee88317 100644 --- a/os/io/mac.c +++ b/os/io/mac.c @@ -65,7 +65,7 @@ void macObjectInit(MACDriver *macp) { * @note This function must be invoked only with the driver in the stopped
* state. If invoked on an active interface then it is ignored. */
-void macSetAddress(MACDriver *macp, uint8_t *p) {
+void macSetAddress(MACDriver *macp, const uint8_t *p) {
mac_lld_set_address(macp, p);
}
@@ -91,8 +91,8 @@ MACTransmitDescriptor *macWaitTransmitDescriptor(MACDriver *macp, systime_t time) {
MACTransmitDescriptor *tdp;
- while ((time > 0) &&
- (tdp = max_lld_get_transmit_descriptor(macp, size)) == NULL) {
+ while (((tdp = max_lld_get_transmit_descriptor(macp, size)) == NULL) &&
+ (time > 0)) {
chSysLock();
systime_t now = chTimeNow();
if (chSemWaitTimeoutS(&tdsem, time) == RDY_TIMEOUT) {
@@ -140,8 +140,8 @@ MACReceiveDescriptor *macWaitReceiveDescriptor(MACDriver *macp, systime_t time) {
MACReceiveDescriptor *rdp;
- while ((time > 0) &&
- (rdp = max_lld_get_receive_descriptor(macp, szp)) == NULL) {
+ while (((rdp = max_lld_get_receive_descriptor(macp, szp)) == NULL) &&
+ (time > 0)) {
chSysLock();
systime_t now = chTimeNow();
if (chSemWaitTimeoutS(&rdsem, time) == RDY_TIMEOUT) {
|