OSDN Git Service

checkpatch: fix g_malloc check
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 6 Apr 2022 12:27:52 +0000 (14:27 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 12 May 2022 10:07:05 +0000 (12:07 +0200)
commitdfdb4f3c28737879685398c4a610a220e1ecf9c2
tree4084a329f1bb8d72bf1e31f8eea4eb0de75c86d8
parent798d8ec0dacd4cc0034298d94f430c14f23e2919
checkpatch: fix g_malloc check

Use the string equality operator "eq", and ensure that $1 is defined by
using "(try|)" instead of "(try)?".  The alternative "((?:try)?)" is
longer and less readable.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
scripts/checkpatch.pl