mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
xen: address MISRA C:2012 Rule 4.1
MISRA C:2012 Rule 4.1 has the following headline: "Octal and hexadecimal escape sequences shall be terminated." The string literals modified by this patch contain octal or hexadecimal escape sequences that are neither terminated by the end of the literal, nor by the beginning of another escape sequence. Therefore, such unterminated sequences have been split into a separate literal as a way to comply with the rule and preserve the semantics of the code. No functional changes. Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
1ab2ae1610
commit
cd50483537
3 files changed
+4
-4
No files matched your search
@@ -3853,7 +3853,7 @@ void hvm_ud_intercept(struct cpu_user_regs *regs)
|
||||
cs, &addr) &&
|
||||
(hvm_copy_from_guest_linear(sig, addr, sizeof(sig),
|
||||
walk, NULL) == HVMTRANS_okay) &&
|
||||
(memcmp(sig, "\xf\xbxen", sizeof(sig)) == 0) )
|
||||
(memcmp(sig, "\xf\xb" "xen", sizeof(sig)) == 0) )
|
||||
{
|
||||
regs->rip += sizeof(sig);
|
||||
regs->eflags &= ~X86_EFLAGS_RF;
|
||||
|
||||
@@ -19,13 +19,13 @@ int __init decompress(void *inbuf, unsigned int len, void *outbuf)
|
||||
if ( len >= 3 && !memcmp(inbuf, "\x42\x5a\x68", 3) )
|
||||
return bunzip2(inbuf, len, NULL, NULL, outbuf, NULL, error);
|
||||
|
||||
if ( len >= 6 && !memcmp(inbuf, "\3757zXZ", 6) )
|
||||
if ( len >= 6 && !memcmp(inbuf, "\375" "7zXZ", 6) )
|
||||
return unxz(inbuf, len, NULL, NULL, outbuf, NULL, error);
|
||||
|
||||
if ( len >= 2 && !memcmp(inbuf, "\135\000", 2) )
|
||||
return unlzma(inbuf, len, NULL, NULL, outbuf, NULL, error);
|
||||
|
||||
if ( len >= 5 && !memcmp(inbuf, "\x89LZO", 5) )
|
||||
if ( len >= 5 && !memcmp(inbuf, "\x89" "LZO", 5) )
|
||||
return unlzo(inbuf, len, NULL, NULL, outbuf, NULL, error);
|
||||
|
||||
if ( len >= 2 && !memcmp(inbuf, "\x02\x21", 2) )
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#define STREAM_HEADER_SIZE 12
|
||||
|
||||
#define HEADER_MAGIC "\3757zXZ"
|
||||
#define HEADER_MAGIC "\375" "7zXZ"
|
||||
#define HEADER_MAGIC_SIZE 6
|
||||
|
||||
#define FOOTER_MAGIC "YZ"
|
||||
|
||||