desc->hypervisor = "PR/SM";
desc->virtype = VIRT_FULL;
while (fgets(buf, sizeof(buf), fd) != NULL) {
- char *str;
+ char *str, *p;
if (!strstr(buf, "Control Program:"))
continue;
desc->hyper = HYPER_IBM;
else
desc->hyper = HYPER_KVM;
- str = strchr(buf, ':');
- if (!str)
+ p = strchr(buf, ':');
+ if (!p)
continue;
- xasprintf(&str, "%s", str + 1);
+ xasprintf(&str, "%s", p + 1);
/* remove leading, trailing and repeating whitespace */
while (*str == ' ')