loadparm: Fix a warning for increased alignment
authorVolker Lendecke <vl@samba.org>
Tue, 18 Oct 2016 10:45:28 +0000 (12:45 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 18 Oct 2016 23:26:14 +0000 (01:26 +0200)
There's tons of those, but you have to start somewhere :-)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/param/loadparm.c

index 9306444a2bffcaf90f36788730f73a1cf07700f5..3e1a15e0399f453d8a3b040a471b20b9aa163a34 100644 (file)
@@ -1943,7 +1943,7 @@ int getservicebyname(const char *pszServiceName, struct loadparm_service *pservi
            (data.dptr != NULL) &&
            (data.dsize == sizeof(iService)))
        {
-               iService = *(int *)data.dptr;
+               memcpy(&iService, data.dptr, sizeof(iService));
        }
 
        TALLOC_FREE(canon_name);