Re: [RFC] gw/smsc/smsc_smpp.c commit to revision 1.85 (amalysh)

Stipe Tolj <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Organization The Kannel Group
Message-ID <[email protected]>
Alexander Malysh wrote:
> 
> it's world known process to tell gcc to not generate any code:
> do {} while(0)
> and don't break compilation.

ok, I guessed that at least on assembler level we would have some instructions 
that "cause no harm".

> as for the benefit, I can tell you: function and macro does the same 
> thing and difference is only that one was function that need function 
> call, stack building, return path, etc. wat macro doesn't need. Now you 
> are free to think what is best for 3 lines of code ;)

agree'ing, the issue is the overhead needed for the function calls.

> that's pretty simple if you look where this function called. This 
> function is shared for data_sm and deliver_sm PDU. And because PDUs are 
> different and offset in union too we must have 2 different function to 
> handle those. But generic DLR handling shared in this function...

ahhh, ok, got the point. You need it in both that use different PDU types. So 
far so good.

> the above points were also straight forward ;)

yep, you shaded now the light on those ;)

Stipe

mailto:stolj_{at}_wapme-group.de
-------------------------------------------------------------------
Wapme Systems AG

Vogelsanger Weg 80
40470 Düsseldorf, NRW, Germany

phone: +49.211.74845.0
fax: +49.211.74845.299

mailto:info_{at}_wapme-systems.de
http://www.wapme-systems.de/
-------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.