1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-27 18:55:19 +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);
if (_abort_on_internal_errors &&
!strncmp(format, INTERNAL_ERROR,
strlen(INTERNAL_ERROR))) {
!strncmp(format, INTERNAL_ERROR, sizeof(INTERNAL_ERROR) - 1)) {
fatal_internal_error = 1;
/* Internal errors triggering abort cannot be suppressed. */
_log_suppress = 0;