X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=net%2Fx25%2Fx25_facilities.c;h=a21f6646eb3a85cd1275708ba53960ed085402da;hb=2dd02c897d798c6a00dca46c7a50ebc10eb3be0d;hp=dec404afa11333830ac69330ce2d6ef4a7fa357a;hpb=48c871c1f6a7c7044dd76774fb469e65c7e2e4e8;p=firefly-linux-kernel-4.4.55.git diff --git a/net/x25/x25_facilities.c b/net/x25/x25_facilities.c index dec404afa113..a21f6646eb3a 100644 --- a/net/x25/x25_facilities.c +++ b/net/x25/x25_facilities.c @@ -205,9 +205,7 @@ int x25_create_facilities(unsigned char *buffer, } if (dte_facs->calling_len && (facil_mask & X25_MASK_CALLING_AE)) { - unsigned bytecount = (dte_facs->calling_len % 2) ? - dte_facs->calling_len / 2 + 1 : - dte_facs->calling_len / 2; + unsigned bytecount = (dte_facs->calling_len + 1) >> 1; *p++ = X25_FAC_CALLING_AE; *p++ = 1 + bytecount; *p++ = dte_facs->calling_len;