summaryrefslogtreecommitdiff
path: root/source3/utils/eventlogadm.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-06-24 16:26:23 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-06-24 16:26:23 +1000
commit6da26870e0ae5acd6ff49a30ec2f6886b44d095e (patch)
tree850c71039563c16a5d563c47e7ba2ab645baf198 /source3/utils/eventlogadm.c
parent6925a799d04c6fa59dd2ddef1f5510f9bb7d17d1 (diff)
parent2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 (diff)
downloadsamba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.gz
samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.bz2
samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.zip
Merge 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 as Samba-4.0alpha16
Diffstat (limited to 'source3/utils/eventlogadm.c')
-rw-r--r--source3/utils/eventlogadm.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/source3/utils/eventlogadm.c b/source3/utils/eventlogadm.c
index 9ddd9c7df8..d170604a1b 100644
--- a/source3/utils/eventlogadm.c
+++ b/source3/utils/eventlogadm.c
@@ -171,14 +171,14 @@ static bool eventlog_add_source( const char *eventlog, const char *sourcename,
if ( !already_in ) {
/* make a new list with an additional entry; copy values, add another */
- wp = TALLOC_ARRAY(ctx, const char *, numsources + 2 );
+ wp = talloc_array(ctx, const char *, numsources + 2 );
if ( !wp ) {
d_printf("talloc() failed \n");
return False;
}
memcpy( wp, wrklist, sizeof( char * ) * numsources );
- *( wp + numsources ) = ( char * ) sourcename;
+ *( wp + numsources ) = (const char * ) sourcename;
*( wp + numsources + 1 ) = NULL;
if (!push_reg_multi_sz(ctx, &blob, wp)) {
return false;
@@ -365,15 +365,12 @@ static int DoDumpCommand(int argc, char **argv, bool debugflag, char *exename)
{
ELOG_TDB *etdb;
TALLOC_CTX *mem_ctx = talloc_tos();
- const char *tdb_filename;
uint32_t count = 1;
if (argc > 2) {
return -1;
}
- tdb_filename = argv[0];
-
if (argc > 1) {
count = atoi(argv[1]);
}
@@ -475,16 +472,16 @@ int main( int argc, char *argv[] )
/* note that the separate command types should call usage if they need to... */
while ( 1 ) {
- if ( !StrCaseCmp( opname, "addsource" ) ) {
+ if ( !strcasecmp_m( opname, "addsource" ) ) {
rc = DoAddSourceCommand( argc, argv, opt_debug,
exename );
break;
}
- if ( !StrCaseCmp( opname, "write" ) ) {
+ if ( !strcasecmp_m( opname, "write" ) ) {
rc = DoWriteCommand( argc, argv, opt_debug, exename );
break;
}
- if ( !StrCaseCmp( opname, "dump" ) ) {
+ if ( !strcasecmp_m( opname, "dump" ) ) {
rc = DoDumpCommand( argc, argv, opt_debug, exename );
break;
}