Permalink
Browse files

Minor cleanups (derived from wal-fsync0-merge branch).

  • Loading branch information...
kostja committed Apr 28, 2012
1 parent 71255a0 commit 81f8c3303ad4a7e1229779eb6ed4e3710016ba91
Showing with 5 additions and 3 deletions.
  1. +3 −3 include/errcode.h
  2. +2 −0 src/say.m
View
@@ -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 */
View
@@ -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. */
}

0 comments on commit 81f8c33

Please sign in to comment.