All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCHv2] Fix adding 8bit reference number
Date: Thu, 02 Sep 2010 12:16:30 -0500	[thread overview]
Message-ID: <4C7FDBEE.9010007@gmail.com> (raw)
In-Reply-To: <1283413663-30349-1-git-send-email-aki.niemi@nokia.com>

[-- Attachment #1: Type: text/plain, Size: 555 bytes --]

Hi Aki,

> -		if (offset != 0) {
> -			sms->submit.ud[offset] = (ref & 0xf0) >> 8;
> -			sms->submit.ud[offset+1] = (ref & 0x0f);
> -		}
> -
>  		sms_address_from_string(&sms->submit.daddr, to);
> +
> +		if (offset == 0)
> +			continue;
> +
> +		if (use_16bit) {
> +			sms->submit.ud[offset] = ref & 0xf0 >> 8;

This doesn't look right at all, bitwise shift >> has higher precedence
than bitwise AND &.

> +			sms->submit.ud[offset+1] = ref & 0x0f;
> +		} else {
> +			sms->submit.ud[offset] = ref & 0x0f;
> +		}

Regards,
-Denis

  reply	other threads:[~2010-09-02 17:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-02  7:47 [PATCHv2] Fix adding 8bit reference number Aki Niemi
2010-09-02 17:16 ` Denis Kenzior [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-09-03 10:12 Aki Niemi
2010-09-03 14:11 ` Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C7FDBEE.9010007@gmail.com \
    --to=denkenz@gmail.com \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.