[asterisk-dev] [svn-commits] mmichelson: trunk r71914 - /trunk/apps/app_record.c
Russell Bryant
russell at digium.com
Wed Jun 27 11:04:09 CDT 2007
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.
Just kidding ... strrchr() != strchr() ...
--
Russell Bryant
Software Engineer
Digium, Inc.
More information about the asterisk-dev
mailing list