Previously this global state needed to be global. It is essentially unused
now and would have needed locking if it were used. Simply push it down
into the sole function which uses it now.
Signed-off-by: Tim Pepper <timothy.c.pepper@linux.intel.com>
#include <sys/stat.h>
#include <sys/time.h>
#include <dirent.h>
-#include <signal.h>
#include <glib.h>
#include <errno.h>
#include "corewatcher.h"
-int uid = 0;
-int sig = 0;
-
const char *core_folder = "/var/lib/corewatcher/";
const char *processed_folder = "/var/lib/corewatcher/processed/";
extern char *strip_directories(char *fullpath);
extern char *get_core_filename(char *filename, char *ext);
extern void remove_name_from_hash(char *fullpath, GHashTable *ht);
-extern int uid;
-extern int sig;
extern const char *core_folder;
extern const char *processed_folder;
if (c) {
c += 6;
if (c < line_len) {
+ int uid;
sscanf(c, "%i", &uid);
fprintf(stderr, "+ uid: %d\n", uid);
}
if (c) {
c += 8;
if (c < line_len) {
+ int sig;
sscanf(c, "%i", &sig);
fprintf(stderr, "+ sig: %d\n", sig);
}