mirror of
https://github.com/samba-team/samba.git
synced 2025-08-02 00:22:11 +03:00
r425: add some comments to ugly code parts
we should take care of 'char *' and 'const char *' and DO NOT mix them!
Jelmer: please fix this
metze
(This used to be commit cd609eb2fe
)
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
f517d6b7ae
commit
4c991c6edd
@ -160,7 +160,6 @@ WERROR reg_open_key(REG_KEY *parent, const char *name, REG_KEY **result)
|
||||
mem_ctx = talloc_init("mem_ctx");
|
||||
|
||||
fullname = talloc_asprintf(mem_ctx, "%s%s%s", parent->path, parent->path[strlen(parent->path)-1] == '\\'?"":"\\", name);
|
||||
\
|
||||
|
||||
if(!parent->handle->functions->open_key) {
|
||||
DEBUG(0, ("Registry backend doesn't have get_subkey_by_name nor open_key!\n"));
|
||||
@ -432,6 +431,7 @@ WERROR reg_key_add_name_recursive(REG_KEY *parent, const char *path)
|
||||
{
|
||||
REG_KEY *cur, *prevcur = parent;
|
||||
WERROR error;
|
||||
/* FIXME: we should never write to a 'const char *' !!! --metze */
|
||||
char *begin = (char *)path, *end;
|
||||
|
||||
while(1) {
|
||||
|
@ -234,6 +234,7 @@ static WERROR rpc_get_value_by_index(REG_KEY *parent, int n, REG_VAL **value)
|
||||
if(vn.max_len > 0) {
|
||||
vn.len = 0;
|
||||
vn.max_len = mykeydata->max_valnamelen*2;
|
||||
/* FIXME: we should not point a 'char *' to a const buffer!!! --metze*/
|
||||
vn.buf = "";
|
||||
}
|
||||
r.in.name = r.out.name = &vn;
|
||||
|
Reference in New Issue
Block a user