[libvirt] [PATCH 4/4] m4: Drop needless string checks

Michal Privoznik posted 4 patches 6 years, 8 months ago
[libvirt] [PATCH 4/4] m4: Drop needless string checks
Posted by Michal Privoznik 6 years, 8 months ago
We provide default values for both MODPROBE and RMMOD and thus
there is no way that their paths can be empty strings.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 m4/virt-external-programs.m4 | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/m4/virt-external-programs.m4 b/m4/virt-external-programs.m4
index f1ae104b32..0f995998c3 100644
--- a/m4/virt-external-programs.m4
+++ b/m4/virt-external-programs.m4
@@ -67,14 +67,10 @@ AC_DEFUN([LIBVIRT_CHECK_EXTERNAL_PROGRAMS], [
                      [Location or name of the ovs-vsctl program])
   AC_DEFINE_UNQUOTED([UDEVADM], ["$UDEVADM"],
                      [Location or name of the udevadm program])
-  if test -n "$MODPROBE"; then
-    AC_DEFINE_UNQUOTED([MODPROBE], ["$MODPROBE"],
-                       [Location or name of the modprobe program])
-  fi
-  if test -n "$RMMOD"; then
-    AC_DEFINE_UNQUOTED([RMMOD], ["$RMMOD"],
-                       [Location or name of the rmmod program])
-  fi
+  AC_DEFINE_UNQUOTED([MODPROBE], ["$MODPROBE"],
+                     [Location or name of the modprobe program])
+  AC_DEFINE_UNQUOTED([RMMOD], ["$RMMOD"],
+                     [Location or name of the rmmod program])
   AC_DEFINE_UNQUOTED([SCRUB], ["$SCRUB"],
                      [Location or name of the scrub program (for wiping algorithms)])
   AC_DEFINE_UNQUOTED([ADDR2LINE], ["$ADDR2LINE"],
-- 
2.21.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 4/4] m4: Drop needless string checks
Posted by Ján Tomko 6 years, 8 months ago
On Fri, May 17, 2019 at 11:54:17AM +0200, Michal Privoznik wrote:
>We provide default values for both MODPROBE and RMMOD and thus
>there is no way that their paths can be empty strings.
>
>Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
>---
> m4/virt-external-programs.m4 | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

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