[libdazzle] menu-manager: just use strcmp
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdazzle] menu-manager: just use strcmp
- Date: Sat, 8 Jul 2017 22:01:41 +0000 (UTC)
commit 6a659e0ecb5d48c232ba466ce8441e3b99a7de85
Author: Christian Hergert <chergert redhat com>
Date: Sat Jul 8 15:01:12 2017 -0700
menu-manager: just use strcmp
We already have to check for non-NULL and have string.h
accessible, so just use strcmp.
src/menus/dzl-menu-manager.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/menus/dzl-menu-manager.c b/src/menus/dzl-menu-manager.c
index 3b1a1af..ccddefc 100644
--- a/src/menus/dzl-menu-manager.c
+++ b/src/menus/dzl-menu-manager.c
@@ -228,8 +228,8 @@ find_position_for_item (GMenuModel *model,
/* If this item requires it is before us, we need to ensure we
* come after this position.
*/
- if ((item_before && id && g_strcmp0 (item_before, id) == 0) ||
- (item_before && label && g_strcmp0 (item_before, label) == 0))
+ if ((item_before && id && strcmp (item_before, id) == 0) ||
+ (item_before && label && strcmp (item_before, label) == 0))
{
if (after_pos == -1 || after_pos < i)
after_pos = i;
@@ -241,8 +241,8 @@ find_position_for_item (GMenuModel *model,
/* If this item requires it is after us, we need to ensure we
* come before this position.
*/
- if ((item_after && id && g_strcmp0 (item_after, id) == 0) ||
- (item_after && label && g_strcmp0 (item_after, label) == 0))
+ if ((item_after && id && strcmp (item_after, id) == 0) ||
+ (item_after && label && strcmp (item_after, label) == 0))
{
if (before_pos == -1 || before_pos > i)
before_pos = i;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]