delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/05/25/06:11:58

Sender: rich AT phekda DOT freeserve DOT co DOT uk
Message-ID: <3CEF6367.DAE358F9@phekda.freeserve.co.uk>
Date: Sat, 25 May 2002 11:11:51 +0100
From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.19 i586)
X-Accept-Language: de,fr
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
Subject: Re: refresh++
References: <10205241453 DOT AA19974 AT clio DOT rice DOT edu> <002901c20392$d9b3c120$0102a8c0 AT acceleron> <3CEF4E7B DOT 17584050 AT phekda DOT freeserve DOT co DOT uk> <000d01c203d0$8ca32c20$0102a8c0 AT acceleron>
Reply-To: djgpp-workers AT delorie DOT com

Hello.

Andrew Cottrell wrote:
[snip]
> I have translated this into my WIP version as follows:-
>     /* No options are required for the default 32-bit environment.  */
>     case _CS_POSIX_V6_ILP32_OFF32_CFLAGS:
>     case _CS_POSIX_V6_ILP32_OFF32_LDFLAGS:
>     case _CS_POSIX_V6_ILP32_OFF32_LIBS:
>     {
>       out_len = 1;
>       memcpy (buf, "\0", out_len);
>       break;
>     }
> 
> Any comments on this?

Why not just do:

    *buf = '\0';

or:

    buf[0] = '\0';

instead of the memcpy?

Bye, Rich =]

-- 
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019