These are called flags because that is what they become to the ndr_pull function,
but to avoid total confusion treat them as flags generally even if the values are
always exclusive (at the moment).
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
struct ndr_pull *ndr_pull;
struct ndr_print *ndr_print;
TALLOC_CTX *mem_ctx;
- int flags;
+ int flags = 0;
poptContext pc;
NTSTATUS status;
enum ndr_err_code ndr_err;
if (strcmp(inout, "in") == 0 ||
strcmp(inout, "request") == 0) {
- flags = NDR_IN;
+ flags |= NDR_IN;
} else if (strcmp(inout, "out") == 0 ||
strcmp(inout, "response") == 0) {
- flags = NDR_OUT;
+ flags |= NDR_OUT;
} else {
printf("Bad inout value '%s'\n", inout);
exit(1);
}
if (ctx_filename) {
- if (flags == NDR_IN) {
+ if (flags & NDR_IN) {
printf("Context file can only be used for \"out\" packages\n");
exit(1);
}