diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-03-01 12:10:10 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:52:10 -0500 |
commit | 71bf8326f53949821291771a8303e48245f5c6e7 (patch) | |
tree | 5a0ff03e49826739a14beddf00af75a58df8225f /source4/lib/samba3/idmap.c | |
parent | 116585c521fd0bc3c80e49c54284c9a949e68091 (diff) | |
download | samba-71bf8326f53949821291771a8303e48245f5c6e7.tar.gz samba-71bf8326f53949821291771a8303e48245f5c6e7.tar.bz2 samba-71bf8326f53949821291771a8303e48245f5c6e7.zip |
r13767: fix compiler warnings
metze
(This used to be commit 0ab3a42341bc1b44de4834adf010a0e511383bfa)
Diffstat (limited to 'source4/lib/samba3/idmap.c')
-rw-r--r-- | source4/lib/samba3/idmap.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/source4/lib/samba3/idmap.c b/source4/lib/samba3/idmap.c index b1c7c0dcca..205089f1cc 100644 --- a/source4/lib/samba3/idmap.c +++ b/source4/lib/samba3/idmap.c @@ -58,17 +58,21 @@ NTSTATUS samba3_read_idmap(const char *fn, TALLOC_CTX *ctx, struct samba3_idmapd for (key = tdb_firstkey(tdb); key.dptr; key = tdb_nextkey(tdb, key)) { struct samba3_idmap_mapping map; - - if (strncmp(key.dptr, "GID ", 4) == 0) { + const char *k = (const char *)key.dptr; + const char *v; + + if (strncmp(k, "GID ", 4) == 0) { map.type = IDMAP_GROUP; - map.unix_id = atoi(key.dptr+4); + map.unix_id = atoi(k+4); val = tdb_fetch(tdb, key); - map.sid = dom_sid_parse_talloc(ctx, val.dptr); - } else if (strncmp(key.dptr, "UID ", 4) == 0) { + v = (const char *)val.dptr; + map.sid = dom_sid_parse_talloc(ctx, v); + } else if (strncmp(k, "UID ", 4) == 0) { map.type = IDMAP_USER; - map.unix_id = atoi(key.dptr+4); + map.unix_id = atoi(k+4); val = tdb_fetch(tdb, key); - map.sid = dom_sid_parse_talloc(ctx, val.dptr); + v = (const char *)val.dptr; + map.sid = dom_sid_parse_talloc(ctx, v); } else { continue; } |