mirror of
https://github.com/samba-team/samba.git
synced 2025-03-08 04:58:40 +03:00
Kill off const warnings - add a pile of const to various places.
This commit is contained in:
parent
3d2f0635ed
commit
1de04ec473
@ -93,7 +93,7 @@ static const smb_socket_option socket_options[] = {
|
||||
static void print_socket_options(int s)
|
||||
{
|
||||
int value, vlen = 4;
|
||||
smb_socket_option *p = &socket_options[0];
|
||||
const smb_socket_option *p = &socket_options[0];
|
||||
|
||||
for (; p->name != NULL; p++) {
|
||||
if (getsockopt(s, p->level, p->option, (void *)&value, &vlen) == -1) {
|
||||
|
@ -43,7 +43,7 @@ ADS_STATUS ads_add_user_acct(ADS_STRUCT *ads, const char *user,
|
||||
TALLOC_CTX *ctx;
|
||||
ADS_MODLIST mods;
|
||||
ADS_STATUS status;
|
||||
char *upn, *new_dn, *name, *controlstr;
|
||||
const char *upn, *new_dn, *name, *controlstr;
|
||||
const char *objectClass[] = {"top", "person", "organizationalPerson",
|
||||
"user", NULL};
|
||||
|
||||
|
@ -1151,7 +1151,7 @@ BOOL api_pipe_request(pipes_struct *p)
|
||||
********************************************************************/
|
||||
|
||||
BOOL api_rpcTNP(pipes_struct *p, char *rpc_name,
|
||||
struct api_struct *api_rpc_cmds)
|
||||
const struct api_struct *api_rpc_cmds)
|
||||
{
|
||||
int fn_num;
|
||||
fstring name;
|
||||
|
@ -127,8 +127,8 @@ static char *map_filename( char *s, /* This is null terminated */
|
||||
*/
|
||||
static void mangled_map(char *s, const char *MangledMap)
|
||||
{
|
||||
char *start=MangledMap; /* Use this to search for mappings. */
|
||||
char *end; /* Used to find the end of strings. */
|
||||
const char *start=MangledMap; /* Use this to search for mappings. */
|
||||
const char *end; /* Used to find the end of strings. */
|
||||
char *match_string;
|
||||
pstring new_string; /* Make up the result here. */
|
||||
char *np; /* Points into new_string. */
|
||||
|
@ -104,7 +104,7 @@ static void print_canon_ace(canon_ace *pace, int num)
|
||||
dbgtext( "canon_ace index %d. Type = %s ", num, pace->attr == ALLOW_ACE ? "allow" : "deny" );
|
||||
dbgtext( "SID = %s ", sid_to_string( str, &pace->trustee));
|
||||
if (pace->owner_type == UID_ACE) {
|
||||
char *u_name = uidtoname(pace->unix_ug.uid);
|
||||
const char *u_name = uidtoname(pace->unix_ug.uid);
|
||||
dbgtext( "uid %u (%s) ", (unsigned int)pace->unix_ug.uid, u_name);
|
||||
} else if (pace->owner_type == GID_ACE) {
|
||||
char *g_name = gidtoname(pace->unix_ug.gid);
|
||||
|
Loading…
x
Reference in New Issue
Block a user