]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/slapadd.c
Operation buffer align fix from HEAD
[openldap] / servers / slapd / slapadd.c
index 23d3c0b2af7e9de1a39808d9a2445e90355e5b6d..2b4cd4f934745f5feb53de286f2b13a45d333aec 100644 (file)
@@ -44,33 +44,33 @@ static char maxcsnbuf[ LDAP_LUTIL_CSNSTR_BUFSIZE ];
 int
 slapadd( int argc, char **argv )
 {
-       char            *buf = NULL;
-       int         lineno;
-       int         lmax;
-       int                     rc = EXIT_SUCCESS;
-
+       char *buf = NULL;
        const char *text;
        char textbuf[SLAP_TEXT_BUFLEN] = { '\0' };
        size_t textlen = sizeof textbuf;
        const char *progname = "slapadd";
-       int manage = 0; 
 
        struct berval csn;
        struct berval maxcsn;
-       int match;
+       struct berval bvtext;
        Attribute *attr;
        Entry *ctxcsn_e;
        ID      ctxcsn_id, id;
+       OperationBuffer opbuf;
+       Operation *op;
+
+       int match;
        int ret;
-       struct berval bvtext;
        int checkvals;
-       char opbuf[OPERATION_BUFFER_SIZE];
-       Operation *op;
+       int lineno;
+       int lmax;
+       int rc = EXIT_SUCCESS;
+       int manage = 0; 
 
        slap_tool_init( progname, SLAPADD, argc, argv );
 
-       memset( opbuf, 0, sizeof(opbuf) );
-       op = (Operation *)opbuf;
+       memset( &opbuf, 0, sizeof(opbuf) );
+       op = (Operation *) &opbuf;
 
        if( !be->be_entry_open ||
                !be->be_entry_close ||