[vte] Remove unnecessary conditional
- From: Behdad Esfahbod <behdad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] Remove unnecessary conditional
- Date: Fri, 1 Oct 2010 20:04:12 +0000 (UTC)
commit 81e166f3f7ef206b58296e41afa9c93af26a85f7
Author: Behdad Esfahbod <behdad behdad org>
Date: Fri Oct 1 16:02:09 2010 -0400
Remove unnecessary conditional
src/vteapp.c | 33 ++++++++++++++++-----------------
1 files changed, 16 insertions(+), 17 deletions(-)
---
diff --git a/src/vteapp.c b/src/vteapp.c
index 0718fd4..a857c20 100644
--- a/src/vteapp.c
+++ b/src/vteapp.c
@@ -1000,23 +1000,22 @@ main(int argc, char **argv)
if (command == NULL || *command == '\0')
command = "/bin/sh";
- if (command != NULL) {
- if (!g_shell_parse_argv(command, &command_argc, &command_argv, &err) ||
- !vte_terminal_fork_command_full(terminal,
- pty_flags,
- NULL,
- command_argv,
- env_add,
- G_SPAWN_SEARCH_PATH,
- NULL, NULL,
- &pid,
- &err)) {
- g_warning("Failed to fork: %s\n", err->message);
- g_error_free(err);
- } else {
- g_print("Fork succeeded, PID %d\n", pid);
- }
- }
+ if (!g_shell_parse_argv(command, &command_argc, &command_argv, &err) ||
+ !vte_terminal_fork_command_full(terminal,
+ pty_flags,
+ NULL,
+ command_argv,
+ env_add,
+ G_SPAWN_SEARCH_PATH,
+ NULL, NULL,
+ &pid,
+ &err)) {
+ g_warning("Failed to fork: %s\n", err->message);
+ g_error_free(err);
+ } else {
+ g_print("Fork succeeded, PID %d\n", pid);
+ }
+
g_strfreev(command_argv);
#ifdef VTE_DEBUG
if (command == NULL) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]