Ethereal-cvs: [Ethereal-cvs] rev 15247: /trunk/: util.c

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

Date: Sat, 06 Aug 2005 18:38:36 GMT
User: guy
Date: 2005/08/06 01:38 PM

Log:
 "setup_tmpdir()" either returns the const string passed to it, or it
 returns a malloced string that's supposed to persist as long as Ethereal
 is running.  Make it return "const char *", and return either the former
 pointer or the result of mallocation, so we don't end up using the same
 variable for a const pointer and a non-const pointer.
 
 Make the variables to which its result is assigned const pointers as
 well.
 
 "strlen()" returns size_t; make a argument to which its result is
 assigned a size_t.
 
 Just out of paranoia, check for a zero-length string passed to
 "setup_tmpdir()".

Directory: /trunk/
  Changes    Path          Action
  +7 -7      util.c        Modified



http://anonsvn.ethereal.com/viewcvs/viewcvs.py?rev=15247&view=rev