diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-05-13 20:23:36 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-05-18 16:12:08 +0200 |
commit | da662b82b87cdbe07762974b1f9e825ef15951bd (patch) | |
tree | f29813bc62f28b9bb73f835828c7f6d3ecbcc872 /source3/utils/net_ads.c | |
parent | c615ebed6e3d273a682806b952d543e834e5630d (diff) | |
download | samba-da662b82b87cdbe07762974b1f9e825ef15951bd.tar.gz samba-da662b82b87cdbe07762974b1f9e825ef15951bd.tar.xz samba-da662b82b87cdbe07762974b1f9e825ef15951bd.zip |
s3-lib Replace StrnCaseCmp() with strncasecmp_m()
strncasecmp_m() never needs to call to talloc, and via next_codepoint()
still has an ASCII fast-path bypassing iconv() calls.
Andrew Bartlett
Diffstat (limited to 'source3/utils/net_ads.c')
-rw-r--r-- | source3/utils/net_ads.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c index e279c9d2bb..f712ddf220 100644 --- a/source3/utils/net_ads.c +++ b/source3/utils/net_ads.c @@ -1349,25 +1349,25 @@ int net_ads_join(struct net_context *c, int argc, const char **argv) /* process additional command line args */ for ( i=0; i<argc; i++ ) { - if ( !StrnCaseCmp(argv[i], "createupn", strlen("createupn")) ) { + if ( !strncasecmp_m(argv[i], "createupn", strlen("createupn")) ) { createupn = true; machineupn = get_string_param(argv[i]); } - else if ( !StrnCaseCmp(argv[i], "createcomputer", strlen("createcomputer")) ) { + else if ( !strncasecmp_m(argv[i], "createcomputer", strlen("createcomputer")) ) { if ( (create_in_ou = get_string_param(argv[i])) == NULL ) { d_fprintf(stderr, _("Please supply a valid OU path.\n")); werr = WERR_INVALID_PARAM; goto fail; } } - else if ( !StrnCaseCmp(argv[i], "osName", strlen("osName")) ) { + else if ( !strncasecmp_m(argv[i], "osName", strlen("osName")) ) { if ( (os_name = get_string_param(argv[i])) == NULL ) { d_fprintf(stderr, _("Please supply a operating system name.\n")); werr = WERR_INVALID_PARAM; goto fail; } } - else if ( !StrnCaseCmp(argv[i], "osVer", strlen("osVer")) ) { + else if ( !strncasecmp_m(argv[i], "osVer", strlen("osVer")) ) { if ( (os_version = get_string_param(argv[i])) == NULL ) { d_fprintf(stderr, _("Please supply a valid operating system version.\n")); werr = WERR_INVALID_PARAM; |