From 9c728a4cde1d023131a5a675b878de3a05dec920 Mon Sep 17 00:00:00 2001 From: Daniel Gall Date: Wed, 7 Feb 2018 01:48:13 -0500 Subject: [PATCH 2/2] du: clarified a variable name The user subtotal reporting feature should integrate trivially with the group subtotal reporting feature described in other correspondence. Thus I changed a variable name for clarity in reading. passwd *g is now passwd *u. --- src/du.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/du.c b/src/du.c index a1d06d5..53349c2 100644 --- a/src/du.c +++ b/src/du.c @@ -457,17 +457,17 @@ print_size (const struct duinfo *pdui, const char *string) if (opt_user_sizes) { uintmax_t i=0; - struct passwd *g; - printf(" Users"); + struct passwd *u; + printf(" Groups"); for (i=0; i<65535; i++){ if (pdui->user_size[i] > 0) { - g = getpwuid(i); + u = getpwuid(i); printf (","); - if (g == NULL){ + if (u == NULL){ printf (" %Ld:", (long long unsigned int)i); }else{ - printf(" %s:", g->pw_name); + printf(" %s:", u->pw_name); } print_only_size(pdui->user_size[i]); } -- 2.10.2