1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

cleanup: use compile time strlen

Use sizeof instead of strlen().
This commit is contained in:
Zdenek Kabelac 2013-07-25 14:18:18 +02:00
parent ba1a8878d0
commit 4a722c5c8b

View File

@ -196,8 +196,7 @@ void print_log(int level, const char *file, int line, int dm_errno_or_class,
level &= ~(_LOG_STDERR|_LOG_ONCE); level &= ~(_LOG_STDERR|_LOG_ONCE);
if (_abort_on_internal_errors && if (_abort_on_internal_errors &&
!strncmp(format, INTERNAL_ERROR, !strncmp(format, INTERNAL_ERROR, sizeof(INTERNAL_ERROR) - 1)) {
strlen(INTERNAL_ERROR))) {
fatal_internal_error = 1; fatal_internal_error = 1;
/* Internal errors triggering abort cannot be suppressed. */ /* Internal errors triggering abort cannot be suppressed. */
_log_suppress = 0; _log_suppress = 0;