mirror of
https://github.com/samba-team/samba.git
synced 2025-02-23 09:57:40 +03:00
s3-rpc_client: use spoolss_driver_version_to_qword in winreg_printer_ver_to_qword
Guenter Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org> Autobuild-User(master): Uri Simchoni <uri@samba.org> Autobuild-Date(master): Tue Sep 27 00:09:18 CEST 2016 on sn-devel-144
This commit is contained in:
parent
04bb54dbd8
commit
85a309b5a3
@ -552,17 +552,13 @@ static WERROR winreg_printer_write_ver(TALLOC_CTX *mem_ctx,
|
||||
|
||||
static WERROR winreg_printer_ver_to_qword(const char *str, uint64_t *data)
|
||||
{
|
||||
unsigned int v1, v2, v3, v4;
|
||||
bool ok;
|
||||
|
||||
if (sscanf(str, "%u.%u.%u.%u", &v1, &v2, &v3, &v4) != 4) {
|
||||
ok = spoolss_driver_version_to_qword(str, data);
|
||||
if (!ok) {
|
||||
return WERR_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
*data = ((uint64_t)(v1 & 0xFFFF) << 48) +
|
||||
((uint64_t)(v2 & 0xFFFF) << 32) +
|
||||
((uint64_t)(v3 & 0xFFFF) << 16) +
|
||||
(uint64_t)(v4 & 0xFFFF);
|
||||
|
||||
return WERR_OK;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user