On Wed, Dec 23, 2009 at 9:01 PM, Vincent Torri <vto...@univ-evry.fr> wrote: > > > On Wed, 23 Dec 2009, Enlightenment SVN wrote: > >> Log: >> When using snprintf or fgets, etc, do not use PATH_MAX directly as the size >> of the variable...use sizeof() compiler directive (lots of these). > > that's something i don't understand. > > char buf[PATH_MAX] is an array of size PATH_MAX in bytes > and sizeof(buf) returns the size of buf in bytes, which is also PATH_MAX > > so what is the interest of using sizeof() instead of PATH_MAX ?
not getting out of sync :-) -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -------------------------------------- MSN: barbi...@gmail.com Skype: gsbarbieri Mobile: +55 (19) 9225-2202 ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel