TODO test/review librpc/ndr: remove align2 hack for relative pointers
authorStefan Metzmacher <metze@samba.org>
Tue, 22 Feb 2011 14:58:45 +0000 (15:58 +0100)
committerJeremy Allison <jra@samba.org>
Mon, 28 Feb 2011 23:54:13 +0000 (15:54 -0800)
metze

librpc/ndr/ndr.c

index 14f9e063379b90c0fe06df7dabb0138b0048503a..e7850d31dfc710b876b5d20ce9e6ad6aca635f5a 100644 (file)
@@ -1181,8 +1181,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_relative_ptr2_start(struct ndr_push *ndr, co
        if (!(ndr->flags & LIBNDR_FLAG_RELATIVE_REVERSE)) {
                uint32_t relative_offset;
                size_t pad;
-               /* TODO: remove this hack and let the idl use FLAG_ALIGN2 explicit */
-               size_t align = 2;
+               size_t align = 1;
 
                if (ndr->offset < ndr->relative_base_offset) {
                        return ndr_push_error(ndr, NDR_ERR_BUFSIZE,
@@ -1271,9 +1270,6 @@ _PUBLIC_ enum ndr_err_code ndr_push_relative_ptr2_end(struct ndr_push *ndr, cons
        /* the reversed offset is at the end of the main buffer */
        correct_offset = ndr->relative_end_offset - len;
 
-       /* TODO: remove this hack and let the idl use FLAG_ALIGN2 explicit */
-       align = 2;
-
        if (ndr->flags & LIBNDR_FLAG_ALIGN2) {
                align = 2;
        } else if (ndr->flags & LIBNDR_FLAG_ALIGN4) {