From: Cyrill Gorcunov <gorcunov@gmail.com> To: Ilya Kosarev <i.kosarev@tarantool.org>, tarantool-patches@dev.tarantool.org Subject: Re: [Tarantool-patches] [PATCH] xlog: make log directory if needed Date: Mon, 29 Jun 2020 15:49:25 +0300 [thread overview] Message-ID: <20200629124925.GB2256@grain> (raw) In-Reply-To: <20200629124808.GA2256@grain> On Mon, Jun 29, 2020 at 03:48:09PM +0300, Cyrill Gorcunov wrote: > On Mon, Jun 29, 2020 at 03:44:19PM +0300, Ilya Kosarev wrote: > ... > > > > +/** Make missing directories from the path. */ > > +int > > +make_dir(char *path) > > +{ > > + char *path_sep = path; > > + while (*path_sep == '/') { > > + /* Don't create root */ > > + ++path_sep; > > + } > > There is a helper function, please make sure that Typo: this is a helper function. > 1) path is having EOS > 2) you don't go outside of path memory > > IOW, I think you should pass some @len parameter > as well and return -1 in case if path is full of '/' > symbols without EOS.
next prev parent reply other threads:[~2020-06-29 12:49 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-06-29 12:44 Ilya Kosarev 2020-06-29 12:48 ` Cyrill Gorcunov 2020-06-29 12:49 ` Cyrill Gorcunov [this message] 2020-06-30 10:19 ` [Tarantool-patches] [PATCH v2] " Ilya Kosarev 2020-06-30 11:17 ` Cyrill Gorcunov 2020-07-09 8:39 ` [Tarantool-patches] [PATCH] " Kirill Yukhin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200629124925.GB2256@grain \ --to=gorcunov@gmail.com \ --cc=i.kosarev@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH] xlog: make log directory if needed' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox