int name_type,
const char *sitename,
struct ip_service **return_iplist,
- int *return_count,
+ size_t *return_count,
const char **resolve_order)
{
const char *tok;
TALLOC_FREE(frame);
return NT_STATUS_UNSUCCESSFUL;
}
- /* Paranoia size_t -> int. */
- if ((int)count < 0) {
- SAFE_FREE(iplist);
- TALLOC_FREE(frame);
- return NT_STATUS_INVALID_PARAMETER;
- }
-
- *return_count = (int)count;
+ *return_count = count;
*return_iplist = iplist;
TALLOC_FREE(frame);
return NT_STATUS_OK;
DEBUG(10, ("\n"));
}
- /*
- * The below can't go negative, we checked
- * above with icount which must always be greater
- * than ret_count, we only subtract addresses,
- * not add them.
- */
*return_count = ret_count;
*return_iplist = iplist;
{
struct ip_service *iplist_malloc = NULL;
struct ip_service *iplist = NULL;
- int count = 0;
+ size_t count = 0;
NTSTATUS status;
status = _internal_resolve_name(name,
return status;
}
- /* Paranoia. */
- if (count < 0) {
- SAFE_FREE(iplist_malloc);
- return NT_STATUS_INVALID_PARAMETER;
- }
-
status = dup_ip_service_array(ctx,
&iplist,
iplist_malloc,
if (!NT_STATUS_IS_OK(status)) {
return status;
}
- *ret_count = (size_t)count;
+ *ret_count = count;
*return_iplist = iplist;
return NT_STATUS_OK;
}