mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 01:34:11 +03:00
virNetServerClientNewPostExecRestart: Drop useless typecasts
In this function, @id is defined as unsigned long long. When passing this variable to virJSONValueObjectGetNumberUlong(), well address of this variable, it's typecasted to ull*. There is no need for that. It's a same story with @nrequests_max. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
8d8f65f0a8
commit
2a3a2c2f5b
@ -485,7 +485,7 @@ virNetServerClientPtr virNetServerClientNewPostExecRestart(virJSONValuePtr objec
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (virJSONValueObjectGetNumberUint(object, "nrequests_max",
|
if (virJSONValueObjectGetNumberUint(object, "nrequests_max",
|
||||||
(unsigned int *)&nrequests_max) < 0) {
|
&nrequests_max) < 0) {
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||||
_("Missing nrequests_client_max field in JSON state document"));
|
_("Missing nrequests_client_max field in JSON state document"));
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -501,8 +501,7 @@ virNetServerClientPtr virNetServerClientNewPostExecRestart(virJSONValuePtr objec
|
|||||||
/* no ID found in, a new one must be generated */
|
/* no ID found in, a new one must be generated */
|
||||||
id = virNetServerNextClientID((virNetServerPtr) opaque);
|
id = virNetServerNextClientID((virNetServerPtr) opaque);
|
||||||
} else {
|
} else {
|
||||||
if (virJSONValueObjectGetNumberUlong(object, "id",
|
if (virJSONValueObjectGetNumberUlong(object, "id", &id) < 0) {
|
||||||
(unsigned long long *) &id) < 0) {
|
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||||
_("Malformed id field in JSON state document"));
|
_("Malformed id field in JSON state document"));
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user