diff options
author | Philippe Brochard <hocwp@free.fr> | 2010-01-24 22:22:18 +0100 |
---|---|---|
committer | Philippe Brochard <hocwp@free.fr> | 2010-01-24 22:22:18 +0100 |
commit | cab23997a98d238915071f5b975fdcb2c2bba369 (patch) | |
tree | 173438c5dab5ead1b74f64ed1d9425537144d983 /xbindkeys.c | |
parent | ba5a3aca5c6e0b1c6644a809db6b7f9b25aefcdd (diff) | |
download | xbindkeys-cab23997a98d238915071f5b975fdcb2c2bba369.tar.gz |
xbindkeys.c (event_loop): Doesn't stat on configuration file change the first time if poll-rc is false. (fix uninitialized variables)
Diffstat (limited to 'xbindkeys.c')
-rw-r--r-- | xbindkeys.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/xbindkeys.c b/xbindkeys.c index 8d0ccfa..2f6ad5a 100644 --- a/xbindkeys.c +++ b/xbindkeys.c @@ -231,21 +231,24 @@ event_loop (Display * d) XEvent e; int i; struct stat rc_file_info; - time_t rc_file_changed; + time_t rc_file_changed = 0; #ifdef GUILE_FLAG - time_t rc_guile_file_changed; + time_t rc_guile_file_changed = 0; struct stat rc_guile_file_info; #endif XSetErrorHandler ((XErrorHandler) null_X_error); - stat(rc_file, &rc_file_info); - rc_file_changed = rc_file_info.st_mtime; + if (poll_rc) + { + stat(rc_file, &rc_file_info); + rc_file_changed = rc_file_info.st_mtime; #ifdef GUILE_FLAG - stat (rc_guile_file, &rc_guile_file_info); - rc_guile_file_changed = rc_guile_file_info.st_mtime; + stat (rc_guile_file, &rc_guile_file_info); + rc_guile_file_changed = rc_guile_file_info.st_mtime; #endif + } while (True) { |