bool nulls[12];
HeapTuple tuple;
PgBackendStatus *beentry;
- SockAddr zero_clientaddr;
MemSet(values, 0, sizeof(values));
MemSet(nulls, 0, sizeof(nulls));
/* Values only available to same user or superuser */
if (superuser() || beentry->st_userid == GetUserId())
{
+ SockAddr zero_clientaddr;
+
if (*(beentry->st_activity) == '\0')
{
values[4] = CStringGetTextDatum("<command string not enabled>");
/* A zeroed client addr means we don't know */
memset(&zero_clientaddr, 0, sizeof(zero_clientaddr));
if (memcmp(&(beentry->st_clientaddr), &zero_clientaddr,
- sizeof(zero_clientaddr) == 0))
+ sizeof(zero_clientaddr)) == 0)
{
nulls[9] = true;
nulls[10] = true;
/* A zeroed client addr means we don't know */
memset(&zero_clientaddr, 0, sizeof(zero_clientaddr));
if (memcmp(&(beentry->st_clientaddr), &zero_clientaddr,
- sizeof(zero_clientaddr) == 0))
+ sizeof(zero_clientaddr)) == 0)
PG_RETURN_NULL();
switch (beentry->st_clientaddr.addr.ss_family)
/* A zeroed client addr means we don't know */
memset(&zero_clientaddr, 0, sizeof(zero_clientaddr));
if (memcmp(&(beentry->st_clientaddr), &zero_clientaddr,
- sizeof(zero_clientaddr) == 0))
+ sizeof(zero_clientaddr)) == 0)
PG_RETURN_NULL();
switch (beentry->st_clientaddr.addr.ss_family)