Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update from mozila's repo #5

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions src/log/r_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,17 @@ int _r_log_init(int use_reg)
char *log;
#endif

if(r_log_initted==0) {
#ifdef WIN32
r_log_env_verbose=1;
#else
log=getenv("R_LOG_VERBOSE");
if(log)
r_log_env_verbose=atoi(log);
#endif

}

if(!use_reg){
if(r_log_initted<R_LOG_INITTED1){
r_log_get_default_level();
Expand All @@ -633,14 +644,6 @@ int _r_log_init(int use_reg)
}
}

#ifdef WIN32
r_log_env_verbose=1;
#else
log=getenv("R_LOG_VERBOSE");
if(log)
r_log_env_verbose=atoi(log);
#endif

return(0);
}

Expand Down
4 changes: 2 additions & 2 deletions src/registry/registry.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,14 @@ NR_reg_fin(NR_registry name)
}

int
NR_reg_get_child_count(char *parent, unsigned int *count)
NR_reg_get_child_count(NR_registry parent, unsigned int *count)
{
assert(sizeof(count) == sizeof(size_t));
return reg_vtbl->vtbl->get_child_count(parent, (size_t*)count);
}

int
NR_reg_get_child_registry(char *parent, unsigned int i, NR_registry child)
NR_reg_get_child_registry(NR_registry parent, unsigned int i, NR_registry child)
{
int r, _status;
size_t count;
Expand Down
4 changes: 2 additions & 2 deletions src/registry/registry_local.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ typedef struct nr_reg_find_children_arg_ {
size_t length;
} nr_reg_find_children_arg;

static int nr_reg_local_iter(char *prefix, int (*action)(void *ptr, r_assoc_iterator *iter, char *prefix, char *name, nr_registry_node *node), void *ptr);
static int nr_reg_local_iter(NR_registry prefix, int (*action)(void *ptr, r_assoc_iterator *iter, char *prefix, char *name, nr_registry_node *node), void *ptr);
static int nr_reg_local_iter_delete(void *ptr, r_assoc_iterator *iter, char *prefix, char *name, nr_registry_node *node);
static int nr_reg_local_find_children(void *ptr, r_assoc_iterator *iter, char *prefix, char *name, nr_registry_node *node);
static int nr_reg_local_count_children(void *ptr, r_assoc_iterator *iter, char *prefix, char *name, nr_registry_node *node);
Expand Down Expand Up @@ -1041,7 +1041,7 @@ nr_reg_local_del(NR_registry name)
}

int
nr_reg_local_get_child_count(char *parent, size_t *count)
nr_reg_local_get_child_count(NR_registry parent, size_t *count)
{
int r, _status;
nr_registry_node *ignore1;
Expand Down
4 changes: 2 additions & 2 deletions src/registry/registrycb.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ nr_reg_raise_event_recurse(char *name, char *tmp, int action)
/* NON-STATIC METHODS */

int
nr_reg_raise_event(char *name, int action)
nr_reg_raise_event(NR_registry name, int action)
{
int r, _status;
int count;
Expand Down Expand Up @@ -417,7 +417,7 @@ NR_reg_register_callback(NR_registry name, char action, void (*cb)(void *cb_arg,
}

int
NR_reg_unregister_callback(char *name, char action, void (*cb)(void *cb_arg, char action, NR_registry name))
NR_reg_unregister_callback(NR_registry name, char action, void (*cb)(void *cb_arg, char action, NR_registry name))
{
int r, _status;
size_t i;
Expand Down
4 changes: 3 additions & 1 deletion src/util/libekr/r_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ int r_data_create(dp,d,l)
if(!(d_->data=(UCHAR *)RMALLOC(l)))
ABORT(R_NO_MEMORY);

memcpy(d_->data,d,l);
if (d) {
memcpy(d_->data,d,l);
}
d_->len=l;

*dp=d_;
Expand Down