patch-2.4.10 linux/drivers/isdn/eicon/idi.c

Next file: linux/drivers/isdn/eicon/kprintf.c
Previous file: linux/drivers/isdn/eicon/Divas_mod.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.9/linux/drivers/isdn/eicon/idi.c linux/drivers/isdn/eicon/idi.c
@@ -431,7 +431,9 @@
     i = this->XCurrent;
     X = PTR_X(a,this);
     while(i<this->XNum && length<270) {
-      clength = MIN((word)(270-length),X[i].PLength-this->XOffset);
+      clength = (word)(270-length);
+      if (clength > X[i].PLength-this->XOffset)
+	      clength = X[i].PLength-this->XOffset;
       a->ram_out_buffer(a,
                         &ReqOut->XBuffer.P[length],
                         PTR_P(a,this,&X[i].P[this->XOffset]),
@@ -837,8 +839,9 @@
         this->ROffset = 0;
         this->RCurrent++;
       }
-      clength = MIN(a->ram_inw(a, &RBuffer->length)-offset,
-                    R[this->RCurrent].PLength-this->ROffset);
+      clength = a->ram_inw(a, &RBuffer->length)-offset;
+      if (clength > R[this->RCurrent].PLength-this->ROffset)
+	      clength = R[this->RCurrent].PLength-this->ROffset;
       if(R[this->RCurrent].P) {
         a->ram_in_buffer(a,
                          &RBuffer->P[offset],

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)