diff options
author | Jeremy Allison <jra@samba.org> | 2000-08-14 23:48:07 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2000-08-14 23:48:07 +0000 |
commit | be4e5eeb4f808c1d8ac4030e8886a83a37914c57 (patch) | |
tree | 8f7fb4380de3b1c32f855a82919bb0f2d932b06b /source/lib | |
parent | 604f6a34effb8aeed7701345a4219749a6a97892 (diff) | |
download | samba-be4e5eeb4f808c1d8ac4030e8886a83a37914c57.tar.gz samba-be4e5eeb4f808c1d8ac4030e8886a83a37914c57.tar.xz samba-be4e5eeb4f808c1d8ac4030e8886a83a37914c57.zip |
Reverted the change Luke made. Removed IS_BITS_SET_XX macros.
Do not re-add them. These macros are unsafe as they are not understood.
Change all TNG code using them to correct '&' and '|' please.
IS_BITS_SET_ALL was being used in cmd_interp.c when IS_BITS_SET_SOME
should have been used.
Jeremy.
Diffstat (limited to 'source/lib')
-rw-r--r-- | source/lib/cmd_interp.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/source/lib/cmd_interp.c b/source/lib/cmd_interp.c index 5f7e98c2438..84fb28049ab 100644 --- a/source/lib/cmd_interp.c +++ b/source/lib/cmd_interp.c @@ -1091,8 +1091,7 @@ static uint32 cmd_set(struct client_info *info, int argc, char *argv[]) } } - if (IS_BITS_SET_ALL(cmd_set_options, CMD_INTER)) - { + if (cmd_set_options & CMD_INTER) { setup_logging(debugf, interactive); if (!interactive) reopen_logs(); @@ -1101,8 +1100,7 @@ static uint32 cmd_set(struct client_info *info, int argc, char *argv[]) strupper(global_myname); fstrcpy(cli_info.myhostname, global_myname); - if (IS_BITS_SET_ALL(cmd_set_options, CMD_SVC)) - { + if (cmd_set_options & CMD_SVC) { if (!lp_load(servicesf, True, False, False)) { fprintf(stderr, @@ -1112,26 +1110,23 @@ static uint32 cmd_set(struct client_info *info, int argc, char *argv[]) } - if (IS_BITS_SET_ALL(cmd_set_options, CMD_INTER)) - { + if (cmd_set_options & CMD_INTER) { load_interfaces(); } DEBUG(10, ("cmd_set: options: %x\n", cmd_set_options)); - if (IS_BITS_SET_ALL(cmd_set_options, CMD_HELP)) - { + if (cmd_set_options & CMD_HELP) { return 0; } - if (IS_BITS_SET_ALL(cmd_set_options, CMD_NOPW)) - { + if (cmd_set_options & CMD_NOPW) { set_user_password(&usr.ntc, True, NULL); } else { set_user_password(&usr.ntc, - IS_BITS_SET_ALL(cmd_set_options, CMD_PASS), + ((cmd_set_options & CMD_PASS) != 0), password); } @@ -1310,8 +1305,7 @@ int command_main(int argc, char *argv[]) status = cmd_set(&cli_info, argc, argv); - if (IS_BITS_SET_SOME(cmd_set_options, CMD_HELP|CMD_STR)) - { + if (cmd_set_options & (CMD_HELP|CMD_STR)) { free_connections(); get_safe_nt_error_msg(status, msg, sizeof(msg)); |