delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mailnull set sender to djgpp-bounces using -f |
From: | "FYS" <zfysz AT cybertrails DOT com> |
Newsgroups: | comp.os.msdos.djgpp |
References: | <4PpD8.150757$v7 DOT 14044373 AT bin6 DOT nnrp DOT aus1 DOT giganews DOT com> <abls3b$1cmu$1 AT trip DOT net> <klAD8.29825$eV5 DOT 2975056 AT bin2 DOT nnrp DOT aus1 DOT giganews DOT com> <abo2mf$i43$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> |
Subject: | Re: casting a pointer of a pointer |
Lines: | 47 |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-Newsreader: | Microsoft Outlook Express 5.50.4522.1200 |
X-MimeOLE: | Produced By Microsoft MimeOLE V5.50.4522.1200 |
Message-ID: | <ARXD8.165148$q8.16884998@bin3.nnrp.aus1.giganews.com> |
NNTP-Posting-Date: | Mon, 13 May 2002 18:18:56 CDT |
Organization: | Giganews.Com - Premium News Outsourcing |
X-Trace: | sv3-Rk4gscv7/jnm6bL3IGOcgHbrQqk+WbbDIy8AY8w+3YYbEYYQM1A9yP2HRwJd0z+yegpKAih4/fE4BZI!lsXMkmUYoljdlAmfh8MhDSlbOVE48/4vLmykZAf18lYPel9Q5u/3BD3aQz/DLE0xE97Eb2wwe4hC!kvW/N5swClUoTKOAcU4= |
X-Complaints-To: | abuse AT GigaNews DOT Com |
X-DMCA-Notifications: | http://www.giganews.com/info/dmca.html |
X-Abuse-Info: | Please be sure to forward a copy of ALL headers |
X-Abuse-Info: | Otherwise we will be unable to process your complaint properly |
Date: | Mon, 13 May 2002 23:18:56 GMT |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
"Hans-Bernhard Broeker" <broeker AT physik DOT rwth-aachen DOT de> wrote in message news:abo2mf$i43$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE... > FYS <zfysz AT cybertrails DOT com> wrote: > [...] > > The > > repcnt = (unsigned short) (* (unsigned short *) li_s); > > works as expected. > > Just a small annotation: that outer case to (unsigned short) is > superfluous. The result of dereferencing an (unsigned short *) > already is an unsigned short. Hi Hans, Yes. Thanks. Usually I do not do this. However, in this particular bit of code, I have a few lines that do the exact same thing except they use different sizes toward li_s. Rather than a comment, though a comment would work as well, I simply placed the cast for my own benefit so that I may pick out the correct sized line. As you probably know, not always does a comment change when the code changes. After a few changes, the comment might be completely different from the line. Thanks all for the comments. A little mistake as the one I made before was fixed after a little sleep. It was just a bit late to retract the post :) Not everyone is as perfect as I am..... (Please note: Meant as sarcasm :) Ben -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Forever Young Software http://www.cybertrails.com/~fys/index.htm To reply by email, please remove the zzzzzz's Batteries not included, Some assembly required.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |