diff options
Diffstat (limited to 'dbus/dbus-spawn.c')
| -rw-r--r-- | dbus/dbus-spawn.c | 38 | 
1 files changed, 10 insertions, 28 deletions
diff --git a/dbus/dbus-spawn.c b/dbus/dbus-spawn.c index 810536fd..eaa9ef15 100644 --- a/dbus/dbus-spawn.c +++ b/dbus/dbus-spawn.c @@ -366,11 +366,9 @@ read_data (DBusBabysitter *sitter,  {    int what;    int got; -  DBusError error; +  DBusError error = DBUS_ERROR_INIT;    ReadStatus r; -   -  dbus_error_init (&error); -   +    r = read_ints (fd, &what, 1, &got, &error);    switch (r) @@ -1238,12 +1236,8 @@ static dbus_bool_t  check_spawn_nonexistent (void *data)  {    char *argv[4] = { NULL, NULL, NULL, NULL }; -  DBusBabysitter *sitter; -  DBusError error; -   -  sitter = NULL; -   -  dbus_error_init (&error); +  DBusBabysitter *sitter = NULL; +  DBusError error = DBUS_ERROR_INIT;    /*** Test launching nonexistent binary */ @@ -1283,12 +1277,8 @@ static dbus_bool_t  check_spawn_segfault (void *data)  {    char *argv[4] = { NULL, NULL, NULL, NULL }; -  DBusBabysitter *sitter; -  DBusError error; -   -  sitter = NULL; -   -  dbus_error_init (&error); +  DBusBabysitter *sitter = NULL; +  DBusError error = DBUS_ERROR_INIT;    /*** Test launching segfault binary */ @@ -1328,12 +1318,8 @@ static dbus_bool_t  check_spawn_exit (void *data)  {    char *argv[4] = { NULL, NULL, NULL, NULL }; -  DBusBabysitter *sitter; -  DBusError error; -   -  sitter = NULL; -   -  dbus_error_init (&error); +  DBusBabysitter *sitter = NULL; +  DBusError error = DBUS_ERROR_INIT;    /*** Test launching exit failure binary */ @@ -1373,12 +1359,8 @@ static dbus_bool_t  check_spawn_and_kill (void *data)  {    char *argv[4] = { NULL, NULL, NULL, NULL }; -  DBusBabysitter *sitter; -  DBusError error; -   -  sitter = NULL; -   -  dbus_error_init (&error); +  DBusBabysitter *sitter = NULL; +  DBusError error = DBUS_ERROR_INIT;    /*** Test launching sleeping binary then killing it */  | 
