Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Patch] Extremely minor and hopefully straight forward: redundant test and indention #96

Open
ZjYwMj opened this issue May 25, 2021 · 0 comments

Comments

@ZjYwMj
Copy link

ZjYwMj commented May 25, 2021

The following is extremely minor and straight forward. I hope it still deserves applying. And that the comments are sufficient.

--- a/src/lxterminal-0.4.0/src/lxterminal.c     2021-02-02 01:30:30.000000000 +0000
+++ b/src/lxterminal-0.4.0/src/lxterminal.c     2021-05-24 18:06:28.062788841 +0000
# https://developer.gnome.org/glib/unstable/glib-String-Utility-Functions.html#g-strfreev
# confirms there is no need to test if ptr != NULL.
@@ -1442,7 +1442,7 @@
          * The <rest of arguments> behavior is demanded by distros who insist on this xterm feature. */
         else if ((strcmp(argument, "--command") == 0) || (strcmp(argument, "-e") == 0))
         {
-            if(arguments->command != NULL) g_strfreev(arguments->command);
+            g_strfreev(arguments->command);
             cmd_len = 0;
             arguments->command = g_malloc(argc * sizeof(gchar *));
 
# Wrong idention 
@@ -1528,7 +1528,7 @@
         else {
             printf("%s\n", usage_display);
             return FALSE;
-    }
+        }
     }
     /* Handle --loginshell. */
     if (arguments->command != NULL && cmd_len <= 2) {
@ZjYwMj ZjYwMj changed the title Extremely minor and hopefully straight forward: redundant test and indention [PATCH] Extremely minor and hopefully straight forward: redundant test and indention Jun 14, 2021
@ZjYwMj ZjYwMj changed the title [PATCH] Extremely minor and hopefully straight forward: redundant test and indention [Patch] Extremely minor and hopefully straight forward: redundant test and indention Jun 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant