[libvirt] [PATCH] udevEnumerateDevices: remove dead code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Clang reported the dead store.


>From 0557e23ca2f5eb78ed9f260040895011785f670f Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@xxxxxxxxxx>
Date: Mon, 1 Mar 2010 16:14:35 +0100
Subject: [PATCH] udevEnumerateDevices: remove dead code

* src/node_device/node_device_udev.c (udevEnumerateDevices): Remove
unnecessary call to udev_list_entry_get_name.
---
 src/node_device/node_device_udev.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
index 68509f4..eee44c4 100644
--- a/src/node_device/node_device_udev.c
+++ b/src/node_device/node_device_udev.c
@@ -1,11 +1,11 @@
 /*
  * node_device_udev.c: node device enumeration - libudev implementation
  *
- * Copyright (C) 2009 Red Hat
+ * Copyright (C) 2009-2010 Red Hat
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
  * version 2.1 of the License, or (at your option) any later version.
  *
  * This library is distributed in the hope that it will be useful,
@@ -1333,30 +1333,28 @@ static int udevProcessDeviceListEntry(struct udev *udev,
 }


 static int udevEnumerateDevices(struct udev *udev)
 {
     struct udev_enumerate *udev_enumerate = NULL;
     struct udev_list_entry *list_entry = NULL;
-    const char *name = NULL;
     int ret = 0;

     udev_enumerate = udev_enumerate_new(udev);

     ret = udev_enumerate_scan_devices(udev_enumerate);
     if (0 != ret) {
         VIR_ERROR("udev scan devices returned %d", ret);
         goto out;
     }

     udev_list_entry_foreach(list_entry,
                             udev_enumerate_get_list_entry(udev_enumerate)) {

         udevProcessDeviceListEntry(udev, list_entry);
-        name = udev_list_entry_get_name(list_entry);
     }

 out:
     udev_enumerate_unref(udev_enumerate);
     return ret;
 }

--
1.7.0.1.414.g89213d

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]