Re: [gtk-list] Re: Apprarently simple signal/event question



On Sat, 18 Dec 1999, Joe Pfeiffer wrote:
+ 1) is this really dangerous?
+ 
+ It depends on the call, and on what you consider dangerous.
+ Disregarding a return value will not, in and of itself, cause you any
+ trouble.  Ever.  I don't know why a function like memcpy bothers to
+ return a pointer, since there is no new information in it and there's
+ no reason to look at it.

For the record, memcpy returns a pointer basically as a convenience of
notation. It is often nice to pass the return of memcpy straight on to
something else in the same line. For instance:

	char *a, *b;
	...
	memcpy (b, a, sizeof char);
	dosomethingelse (b);
// as opposed to...
	dosomethingelse( memcpy(b, a, sizeof char));

(Man! C++ has made my C skills rot... That seems soo complicated... :)

Cheers,
-M. D. Krauss



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]