ntfs_log_handler_syslog(): don't lose errno in an error path

master
szaka 2007-07-08 20:47:48 +00:00
parent c214b9c11c
commit 076e26f92e
1 changed files with 3 additions and 2 deletions

View File

@ -365,7 +365,8 @@ int ntfs_log_handler_syslog(const char *function __attribute__((unused)),
ret = vsnprintf(log, LOG_LINE_LEN, format, args);
if (ret < 0) {
vsyslog(LOG_NOTICE, format, args);
return 1;
ret = 1;
goto out;
}
if ((LOG_LINE_LEN > ret + 3) && (level & NTFS_LOG_LEVEL_PERROR)) {
@ -375,7 +376,7 @@ int ntfs_log_handler_syslog(const char *function __attribute__((unused)),
}
syslog(LOG_NOTICE, "%s", log);
out:
errno = olderr;
return ret;
}