From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> To: Cyrill Gorcunov <gorcunov@gmail.com>, tml <tarantool-patches@dev.tarantool.org> Cc: Mons Anderson <v.perepelitsa@corp.mail.ru> Subject: Re: [Tarantool-patches] [PATCH v4 1/4] util: introduce strlcpy helper Date: Mon, 14 Dec 2020 23:54:04 +0100 [thread overview] Message-ID: <78cabca8-0c39-92a6-61e9-7faa77f71c6a@tarantool.org> (raw) In-Reply-To: <20201210161832.729439-2-gorcunov@gmail.com> Hi! Thanks for the patch! > diff --git a/src/trivia/util.h b/src/trivia/util.h > index da5a3705e..8dcc48ada 100644 > --- a/src/trivia/util.h > +++ b/src/trivia/util.h > @@ -450,6 +450,21 @@ fpconv_strtod(const char *nptr, char **endptr) > return strtod(nptr, endptr); > } > > +#ifndef HAVE_STRLCPY > +/** > + * Copy string. Unlike \a strncpy the result string Please, use @, not \. We use it in all new code. https://github.com/tarantool/tarantool/wiki/Code-review-procedure#code-style > + * is always null-terminated. > + * > + * @param dst destination buffer. > + * @param src source string. > + * @param size destination buffer size. > + * > + * @return size of \a src string. > + */ > +size_t > +strlcpy(char *dst, const char *src, size_t size); > +#endif > + > /** > * Check that @a str is valid utf-8 sequence and can be printed > * unescaped. >
next prev parent reply other threads:[~2020-12-14 22:54 UTC|newest] Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-12-10 16:18 [Tarantool-patches] [PATCH v4 0/4] crash: implement sending feedback Cyrill Gorcunov 2020-12-10 16:18 ` [Tarantool-patches] [PATCH v4 1/4] util: introduce strlcpy helper Cyrill Gorcunov 2020-12-11 7:34 ` Serge Petrenko 2020-12-11 7:58 ` Serge Petrenko 2020-12-11 10:04 ` Cyrill Gorcunov 2020-12-11 11:07 ` Serge Petrenko 2020-12-11 11:38 ` Cyrill Gorcunov 2020-12-14 22:54 ` Vladislav Shpilevoy 2020-12-14 22:54 ` Vladislav Shpilevoy [this message] 2020-12-15 8:47 ` Cyrill Gorcunov 2020-12-10 16:18 ` [Tarantool-patches] [PATCH v4 2/4] backtrace: allow to specify destination buffer Cyrill Gorcunov 2020-12-11 7:50 ` Serge Petrenko 2020-12-10 16:18 ` [Tarantool-patches] [PATCH v4 3/4] crash: move fatal signal handling in Cyrill Gorcunov 2020-12-11 9:31 ` Serge Petrenko 2020-12-11 10:38 ` Cyrill Gorcunov 2020-12-11 11:12 ` Serge Petrenko 2020-12-14 22:54 ` Vladislav Shpilevoy 2020-12-15 8:16 ` Cyrill Gorcunov 2020-12-20 14:48 ` Vladislav Shpilevoy 2020-12-20 15:49 ` Cyrill Gorcunov 2020-12-20 16:07 ` Vladislav Shpilevoy 2020-12-20 16:58 ` Cyrill Gorcunov 2020-12-20 15:45 ` Vladislav Shpilevoy 2020-12-10 16:18 ` [Tarantool-patches] [PATCH v4 4/4] crash: report crash data to the feedback server Cyrill Gorcunov 2020-12-11 12:57 ` Serge Petrenko 2020-12-12 16:19 ` Cyrill Gorcunov 2020-12-12 17:07 ` Cyrill Gorcunov 2020-12-14 9:41 ` Serge Petrenko 2020-12-14 22:54 ` Vladislav Shpilevoy 2020-12-16 11:16 ` Cyrill Gorcunov 2020-12-16 20:31 ` Cyrill Gorcunov 2020-12-20 15:16 ` Vladislav Shpilevoy 2020-12-20 18:26 ` Cyrill Gorcunov 2020-12-20 14:48 ` Vladislav Shpilevoy 2020-12-20 18:21 ` Cyrill Gorcunov 2020-12-20 18:41 ` Vladislav Shpilevoy 2020-12-20 19:16 ` Cyrill Gorcunov 2020-12-21 17:01 ` Vladislav Shpilevoy
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=78cabca8-0c39-92a6-61e9-7faa77f71c6a@tarantool.org \ --to=v.shpilevoy@tarantool.org \ --cc=gorcunov@gmail.com \ --cc=tarantool-patches@dev.tarantool.org \ --cc=v.perepelitsa@corp.mail.ru \ --subject='Re: [Tarantool-patches] [PATCH v4 1/4] util: introduce strlcpy helper' \ /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