Fix bug that name resolution failed for a long time under particular cases.
If a DNS query for IPv6 succeeds and IPv4 fails, only the answer of the
IPv6 query is saved in the cache. If only IPv4 is given from LTE,
name resolution will fail while the answer is saved in the cache.
Therefore, the ALT1250 daemon sets the given IP type to the DNS client,
which can only send DNS queries for that IP type.
Add missing FAR and CODE to pointers
Remove FAR for non-pointer variables
Remove extra spaces and align the parameters
Add do {} while(0) wrapper in macro
Use nitems to calculate number of elements in arrays
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>