Tarantool development patches archive
 help / color / mirror / Atom feed
* [tarantool-patches] [PATCH] box: removed unnecessary check of log string
@ 2018-07-24 11:19 Olga Arkhangelskaia
  2018-07-24 17:37 ` [tarantool-patches] " Kirill Yukhin
  0 siblings, 1 reply; 2+ messages in thread
From: Olga Arkhangelskaia @ 2018-07-24 11:19 UTC (permalink / raw)
  To: tarantool-patches; +Cc: Olga Arkhangelskaia

This check happens twice. The patch simply removes check.
---
https://github.com/tarantool/tarantool/tree/OKriw/Remove_unnecessary_check

 src/box/box.cc |  5 -----
 src/say.c      | 18 ------------------
 src/say.h      |  8 --------
 3 files changed, 31 deletions(-)

diff --git a/src/box/box.cc b/src/box/box.cc
index 3ed2a4a44..b6c22b081 100644
--- a/src/box/box.cc
+++ b/src/box/box.cc
@@ -362,11 +362,6 @@ box_check_say()
 			  diag_last_error(diag_get())->errmsg);
 	}
 
-	if (say_check_init_str(log) == -1) {
-
-		diag_raise();
-	}
-
 	if (type == SAY_LOGGER_SYSLOG) {
 		struct say_syslog_opts opts;
 		if (say_parse_syslog_opts(log, &opts) < 0) {
diff --git a/src/say.c b/src/say.c
index 287ec5000..ac221dd19 100644
--- a/src/say.c
+++ b/src/say.c
@@ -960,24 +960,6 @@ write_to_syslog(struct log *log, int total)
  * Init string parser(s)
  */
 
-int
-say_check_init_str(const char *str)
-{
-	enum say_logger_type type;
-	if (say_parse_logger_type(&str, &type)) {
-		diag_set(IllegalParams, logger_syntax_reminder);
-		return -1;
-	}
-	if (type == SAY_LOGGER_SYSLOG) {
-		struct say_syslog_opts opts;
-
-		if (say_parse_syslog_opts(str, &opts) < 0)
-			return -1;
-		say_free_syslog_opts(&opts);
-	}
-	return 0;
-}
-
 /**
  * @retval string after prefix if a prefix is found,
  *         *str also is advanced to the prefix
diff --git a/src/say.h b/src/say.h
index f4c6b8eb9..2c2395fe0 100644
--- a/src/say.h
+++ b/src/say.h
@@ -372,14 +372,6 @@ CFORMAT(printf, 5, 0) extern sayfunc_t _say;
 #define log_say_syserror(log, format, ...) \
 	log_say_level(log, S_SYSERROR, strerror(errno), format, ##__VA_ARGS__)
 
-/**
- * validates logger init string;
- * @returns 0 if validation passed or -1
- *           with an error message written to diag
- */
-int
-say_check_init_str(const char *str);
-
 /* internals, for unit testing */
 
 /**
-- 
2.14.3 (Apple Git-98)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [tarantool-patches] Re: [PATCH] box: removed unnecessary check of log string
  2018-07-24 11:19 [tarantool-patches] [PATCH] box: removed unnecessary check of log string Olga Arkhangelskaia
@ 2018-07-24 17:37 ` Kirill Yukhin
  0 siblings, 0 replies; 2+ messages in thread
From: Kirill Yukhin @ 2018-07-24 17:37 UTC (permalink / raw)
  To: tarantool-patches; +Cc: Olga Arkhangelskaia

Hello,
On 24 июл 14:19, Olga Arkhangelskaia wrote:
> This check happens twice. The patch simply removes check.
> ---
> https://github.com/tarantool/tarantool/tree/OKriw/Remove_unnecessary_check
I've checked your patch into 2.0 branch.

--
Regards, Kirill Yukhin

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-07-24 17:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-24 11:19 [tarantool-patches] [PATCH] box: removed unnecessary check of log string Olga Arkhangelskaia
2018-07-24 17:37 ` [tarantool-patches] " Kirill Yukhin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox