fix caption alignment if date is displayed in local time
authorAndreas Steffen <andreas.steffen@strongswan.org>
Fri, 23 May 2008 19:21:08 +0000 (19:21 -0000)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Fri, 23 May 2008 19:21:08 +0000 (19:21 -0000)
src/charon/plugins/sql/pool.c

index 5187fdd..a5ddcb2 100644 (file)
@@ -246,9 +246,11 @@ static void leases(char *name, char *filter, bool utc)
        {
                if (!found)
                {
+                       int len = utc ? 25 : 21;
+
                        found = TRUE;
-                       printf("%-8s %15s  %-33s %-25s %-25s %-7s\n",
-                                  "name", "address", "identity", "start", "end", "status");
+                       printf("%-8s %15s  %-33s %-*s %-*s %-7s\n",
+                                  "name", "address", "identity", len, "start", len, "end", "status");
                }
                address = host_create_from_blob(address_chunk);
                identity = identification_create_from_encoding(identity_type, identity_chunk);