mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-09-04 12:41:37 +00:00
kvm tools: Cleanup strstr() in expression
Cleanup use of strstr() in an expression in main() function. Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
committed by
Will Deacon
parent
79fafcf1d3
commit
7e8625445b
@@ -149,7 +149,7 @@ int main(int argc, char *argv[])
|
||||
kvm__setup_cpuid(kvm);
|
||||
|
||||
strcpy(real_cmdline, "notsc nolapic nosmp noacpi pci=conf1 console=ttyS0 ");
|
||||
if (!kernel_cmdline || (strstr(kernel_cmdline, "root=") == NULL))
|
||||
if (!kernel_cmdline || !strstr(kernel_cmdline, "root="))
|
||||
strlcat(real_cmdline, "root=/dev/vda rw ", sizeof(real_cmdline));
|
||||
|
||||
if (kernel_cmdline) {
|
||||
|
||||
Reference in New Issue
Block a user