Re: [PATCH] Use G_N_ELEMENTS() more

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Mon, Mar 13, 2023 at 12:57 PM Michal Privoznik <mprivozn@xxxxxxxxxx> wrote:
In a few places we still use the good old:

  sizeof(var) / sizeof(var[0])
  sizeof(var) / sizeof(int)

The G_N_ELEMENTS() macro is preferred though. In a few places we
don't link with glib, so provide the macro definition.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 examples/c/misc/openauth.c | 4 +++-
 src/libvirt.c              | 2 +-
 tests/virbitmaptest.c      | 4 ++--
 tests/virnetdevtest.c      | 8 ++++----
 tools/nss/libvirt_nss.c    | 3 ++-
 tools/virt-login-shell.c   | 3 ++-
 6 files changed, 14 insertions(+), 10 deletions(-)


Reviewed-by: Kristina Hanicova <khanicov@xxxxxxxxxx>

Kristina

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux