This is an automated email from the git hooks/post-receive script.

git pushed a commit to reference refs/pull/49/head
in repository enlightenment.

View the commit online.

commit fc30c75946b5b15226e394b8c40eb702ff56fd59
Author: rafspiny <rafsp...@gmail.com>
AuthorDate: Thu Aug 3 12:29:00 2023 +0200

    More readable strcmp in ifs
---
 src/modules/convertible/dbus_acceleration.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/modules/convertible/dbus_acceleration.c b/src/modules/convertible/dbus_acceleration.c
index e2be711a8..660f886d1 100644
--- a/src/modules/convertible/dbus_acceleration.c
+++ b/src/modules/convertible/dbus_acceleration.c
@@ -149,13 +149,13 @@ access_string_property(const Eldbus_Message *msg, Eldbus_Message_Iter **variant,
    }
 
    enum screen_rotation rotation = UNDEFINED;
-   if (strcmp(ACCELEROMETER_ORIENTATION_RIGHT, *string_property_value) == 0)
+   if (!strcmp(ACCELEROMETER_ORIENTATION_RIGHT, *string_property_value))
       rotation = RIGHT_UP;
-   if (strcmp(ACCELEROMETER_ORIENTATION_LEFT, *string_property_value) == 0)
+   if (!strcmp(ACCELEROMETER_ORIENTATION_LEFT, *string_property_value))
       rotation = LEFT_UP;
-   if (strcmp(ACCELEROMETER_ORIENTATION_BOTTOM, *string_property_value) == 0)
+   if (!strcmp(ACCELEROMETER_ORIENTATION_BOTTOM, *string_property_value))
       rotation = FLIPPED;
-   if (strcmp(ACCELEROMETER_ORIENTATION_NORMAL, *string_property_value) == 0)
+   if (!strcmp(ACCELEROMETER_ORIENTATION_NORMAL, *string_property_value))
       rotation = NORMAL;
 
    free(type);
@@ -329,7 +329,7 @@ _fetch_X_device_input_number(void)
        iterator = property_name;
        for (int i=0; i<num_properties; i++)
        {
-          if (strcmp(*iterator, CTM_name) == 0)
+          if (!strcmp(*iterator, CTM_name))
           {
 	     dev_number = dev_counter;
              DBG("Setting device: %d", dev_number);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to