These variables are only used for assignment and have
no other effect.
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
const char *type,
virDomainHostdevDefPtr def)
{
- xmlNodePtr sourcenode;
-
/* @type is passed in from the caller rather than read from the
* xml document, because it is specified in different places for
* different kinds of defs - it is an attribute of
return -1;
}
- if (!(sourcenode = virXPathNode("./source", ctxt))) {
+ if (!virXPathNode("./source", ctxt)) {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("Missing <source> element in hostdev device"));
return -1;
DIR *dh = NULL;
const char *p;
char *ret = NULL;
- int rc;
/* If a path is NOT provided then assume it's DM name */
p = strrchr(path, '/');
if (virDirOpen(&dh, DEV_DM_DIR) < 0)
return NULL;
- while ((rc = virDirRead(dh, &ent, DEV_DM_DIR)) > 0) {
+ while (virDirRead(dh, &ent, DEV_DM_DIR) > 0) {
g_autofree char *tmp = g_strdup_printf(DEV_DM_DIR "/%s", ent->d_name);
if (stat(tmp, &sb[1]) == 0 &&