crm_resource --list-agents: don't print uninitialized memory
When the first character of the argument is a colon, the original code
printed uninitialized memory, because sscanf returned 0. For example:
$ /usr/sbin/crm_resource --list-agents=:
No agents found for standard=øDÀ, provider=
This patch avoids using arbitrarily sized buffers, and separates
standard and provider by changing argv through the optarg pointer.
Signed-off-by: Ferenc Wágner <wferi@niif.hu>