int profiling_locks_enabled = 0;
int profiling_locks_output_to_file = 0;
char *profiling_locks_file_name = NULL;
-char *profiling_locks_file_mode = "a";
+const char *profiling_locks_file_mode = "a";
typedef struct LockRecord_ {
char *file; // hash
return 0;
}
-void LockRecordAdd(ProfilingLock *l)
+static void LockRecordAdd(ProfilingLock *l)
{
LockRecord fn = { NULL, NULL, 0,0,0,0,0,0}, *ptr = &fn;
fn.file = l->file;
}
}
-void SCProfilingListLocks(void)
+static void SCProfilingListLocks(void)
{
FILE *fp = NULL;
while (b) {
LockRecord *r = HashListTableGetListData(b);
- char *lock;
+ const char *lock;
switch (r->type) {
case LOCK_MUTEX:
lock = "mtx";
extern int profiling_locks_enabled;
extern int profiling_locks_output_to_file;
extern char *profiling_locks_file_name;
-extern char *profiling_locks_file_mode;
+extern const char *profiling_locks_file_mode;
typedef struct SCProfilePacketData_ {
uint64_t min;
const char *filename = ConfNodeLookupChildValue(conf, "filename");
if (filename != NULL) {
- char *log_dir;
- log_dir = ConfigGetLogDirectory();
+ const char *log_dir = ConfigGetLogDirectory();
profiling_locks_file_name = SCMalloc(PATH_MAX);
if (unlikely(profiling_locks_file_name == NULL)) {