diff --git a/include/errcode.h b/include/errcode.h index b8ab06586f9e..99e053149648 100644 --- a/include/errcode.h +++ b/include/errcode.h @@ -1,5 +1,5 @@ -#ifndef TARANTOOL_ERRCODE_H -#define TARANTOOL_ERRCODE_H +#ifndef TARANTOOL_ERRCODE_H_INCLUDED +#define TARANTOOL_ERRCODE_H_INCLUDED /* * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following @@ -145,4 +145,4 @@ static inline const char *tnt_errcode_desc(uint32_t errcode) } -#endif /* TARANTOOL_ERRCODE_H */ +#endif /* TARANTOOL_ERRCODE_H_INCLUDED */ diff --git a/src/say.m b/src/say.m index 0fe923b16b5e..9a2de26bcd58 100644 --- a/src/say.m +++ b/src/say.m @@ -168,10 +168,12 @@ void _say(int level, const char *filename, int line, const char *error, const char *format, ...) { + int errsv = errno; /* Preserve the errno. */ if (cfg.log_level < level) return; va_list ap; va_start(ap, format); vsay(level, filename, line, error, format, ap); va_end(ap); + errno = errsv; /* Preserve the errno. */ }