[PATCH libosinfo 2/4] osinfo-detect: Replace strcmp() with g_str_equal()

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

 



https://bugzilla.redhat.com/show_bug.cgi?id=1335291

Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx>
---
 tools/osinfo-detect.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/osinfo-detect.c b/tools/osinfo-detect.c
index c6fb36f..952f0ff 100644
--- a/tools/osinfo-detect.c
+++ b/tools/osinfo-detect.c
@@ -54,9 +54,9 @@ static gboolean parse_format_str(const gchar *option_name,
                                  gpointer data,
                                  GError **error)
 {
-    if (strcmp(value, FORMAT_STR_ENV) == 0)
+    if (g_str_equal(value, FORMAT_STR_ENV))
         format = OUTPUT_FORMAT_ENV;
-    else if (strcmp(value, FORMAT_STR_PLAIN) == 0)
+    else if (g_str_equal(value, FORMAT_STR_PLAIN))
         format = OUTPUT_FORMAT_PLAIN;
     else {
         g_set_error(error,
@@ -75,9 +75,9 @@ static gboolean parse_type_str(const gchar *option_name,
                                gpointer data,
                                GError **error)
 {
-    if (strcmp(value, TYPE_STR_MEDIA) == 0)
+    if (g_str_equal(value, TYPE_STR_MEDIA))
         type = URL_TYPE_MEDIA;
-    else if (strcmp(value, TYPE_STR_TREE) == 0)
+    else if (g_str_equal(value, TYPE_STR_TREE))
         type = URL_TYPE_TREE;
     else {
         g_set_error(error,
-- 
2.17.1

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo




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

  Powered by Linux