mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-05 00:37:59 +02:00
_dbus_check_fdleaks_enter, _dbus_check_fdleaks_leave: whitespace
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35173 Reviewed-by: Colin Walters <walters@verbum.org>
This commit is contained in:
parent
e4abc1d1a5
commit
9c690c8b4f
1 changed files with 12 additions and 12 deletions
|
|
@ -157,7 +157,7 @@ _dbus_check_fdleaks_enter (void)
|
|||
|
||||
/* This works on Linux only */
|
||||
|
||||
if ((d = opendir("/proc/self/fd")))
|
||||
if ((d = opendir ("/proc/self/fd")))
|
||||
{
|
||||
struct dirent *de;
|
||||
|
||||
|
|
@ -171,21 +171,21 @@ _dbus_check_fdleaks_enter (void)
|
|||
continue;
|
||||
|
||||
errno = 0;
|
||||
l = strtol(de->d_name, &e, 10);
|
||||
_dbus_assert(errno == 0 && e && !*e);
|
||||
l = strtol (de->d_name, &e, 10);
|
||||
_dbus_assert (errno == 0 && e && !*e);
|
||||
|
||||
fd = (int) l;
|
||||
|
||||
if (fd < 3)
|
||||
continue;
|
||||
|
||||
if (fd == dirfd(d))
|
||||
if (fd == dirfd (d))
|
||||
continue;
|
||||
|
||||
FD_SET (fd, &fds->set);
|
||||
}
|
||||
|
||||
closedir(d);
|
||||
closedir (d);
|
||||
}
|
||||
|
||||
return fds;
|
||||
|
|
@ -202,7 +202,7 @@ _dbus_check_fdleaks_leave (DBusInitialFDs *fds)
|
|||
|
||||
/* This works on Linux only */
|
||||
|
||||
if ((d = opendir("/proc/self/fd")))
|
||||
if ((d = opendir ("/proc/self/fd")))
|
||||
{
|
||||
struct dirent *de;
|
||||
|
||||
|
|
@ -216,25 +216,25 @@ _dbus_check_fdleaks_leave (DBusInitialFDs *fds)
|
|||
continue;
|
||||
|
||||
errno = 0;
|
||||
l = strtol(de->d_name, &e, 10);
|
||||
_dbus_assert(errno == 0 && e && !*e);
|
||||
l = strtol (de->d_name, &e, 10);
|
||||
_dbus_assert (errno == 0 && e && !*e);
|
||||
|
||||
fd = (int) l;
|
||||
|
||||
if (fd < 3)
|
||||
continue;
|
||||
|
||||
if (fd == dirfd(d))
|
||||
if (fd == dirfd (d))
|
||||
continue;
|
||||
|
||||
if (FD_ISSET (fd, &fds->set))
|
||||
continue;
|
||||
|
||||
_dbus_warn("file descriptor %i leaked in %s.\n", fd, __FILE__);
|
||||
_dbus_assert_not_reached("fdleaks");
|
||||
_dbus_warn ("file descriptor %i leaked in %s.\n", fd, __FILE__);
|
||||
_dbus_assert_not_reached ("fdleaks");
|
||||
}
|
||||
|
||||
closedir(d);
|
||||
closedir (d);
|
||||
}
|
||||
|
||||
free (fds);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue