diff options
author | Michal Zidek <mzidek@redhat.com> | 2013-08-28 12:46:58 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-02-05 14:41:38 +0100 |
commit | d8057ec487e452038f0106042021fa612bbb8555 (patch) | |
tree | 18a64c53087b928ef0bbb03820077be40117ab6e /src/responder/autofs | |
parent | 8263ecef6f5c6dab802fdabaf57c25fd2fcf692e (diff) | |
download | sssd-d8057ec487e452038f0106042021fa612bbb8555.tar.gz sssd-d8057ec487e452038f0106042021fa612bbb8555.tar.xz sssd-d8057ec487e452038f0106042021fa612bbb8555.zip |
responder: Use SAFEALIGN macros where appropriate.
https://fedorahosted.org/sssd/ticket/1359
Diffstat (limited to 'src/responder/autofs')
-rw-r--r-- | src/responder/autofs/autofssrv_cmd.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/responder/autofs/autofssrv_cmd.c b/src/responder/autofs/autofssrv_cmd.c index 32ea51074..a56003c97 100644 --- a/src/responder/autofs/autofssrv_cmd.c +++ b/src/responder/autofs/autofssrv_cmd.c @@ -326,8 +326,12 @@ static void sss_autofs_cmd_setautomntent_done(struct tevent_req *req) } sss_packet_get_body(packet, &body, &blen); - ((uint32_t *)body)[0] = 1; /* Got some results */ - ((uint32_t *)body)[1] = 0; /* reserved */ + + /* Got some results */ + SAFEALIGN_SETMEM_UINT32(body, 1, NULL); + + /* Reserved padding */ + SAFEALIGN_SETMEM_UINT32(body + sizeof(uint32_t), 0, NULL); } sss_cmd_done(cmdctx->cctx, NULL); |