On Wednesday 27 June 2007 07:57, Russell Bryant wrote: > SVN commits to the Digium repositories wrote: > > + /* Create the directory if it does not exist. */ > > + dir = ast_strdupa(tmp); > > + if ((file = strrchr(dir, '/'))) > > + *file++ = '\0'; > > The previous two lines can be simplified by using: > > dir = strsep(&dir, "/"); > > Then, you don't need the file var at all.
That would be true if the function call was strchr(), but it's not, it's strrchr(). strsep() would not do the same thing. -- Tilghman _______________________________________________ --Bandwidth and Colocation Provided by http://www.api-digital.com-- asterisk-dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
