Avoid compiler warning about type mismatch in ?:

This commit is contained in:
Peter Eisentraut 2015-03-13 01:17:06 -04:00
parent 26ab098b8b
commit fae032efc9
1 changed files with 4 additions and 3 deletions

7
uri.c
View File

@ -242,9 +242,10 @@ uri_path(PG_FUNCTION_ARGS)
}
uriFreeUriMembersA(&uri);
PG_RETURN_ARRAYTYPE_P(astate
? makeArrayResult(astate, CurrentMemoryContext)
: construct_empty_array(TEXTOID));
if (astate)
PG_RETURN_ARRAYTYPE_P(makeArrayResult(astate, CurrentMemoryContext));
else
PG_RETURN_ARRAYTYPE_P(construct_empty_array(TEXTOID));
}
static int