[Dnsmasq-discuss] Extension to hosts-dir and dhcohosts-dir
Andy Hawkins
andy at gently.org.uk
Sun Feb 11 15:58:47 GMT 2018
Hi,
In article <slrnp80btc.nkj.andy at xcp-mailnews.gently.org.uk>,
Andy Hawkins<andy at gently.org.uk> wrote:
> I could have a look at submitting a patch, but my editor is showing some
> very strange indentation of the source, so I suspect I have my tab settings
> incorrect. What is the standard setting for tabs on the dnasmasq source
> files?
Here's an attempt at a patch. If it needs to be in a different format, then
please let me know. The changes are minimal however, so applying the patch
manually should be trivial.
[andy at xcp-dev dnsmasq (hosts-dirs *)]$ git diff --ignore-space-at-eol
diff --git a/src/inotify.c b/src/inotify.c
old mode 100644
new mode 100755
index eda1d56..a655fe2
--- a/src/inotify.c
+++ b/src/inotify.c
@@ -235,8 +235,8 @@ int inotify_check(time_t now)
/* ignore emacs backups and dotfiles */
if (in->len == 0 ||
- in->name[in->len - 1] == '~' ||
- (in->name[0] == '#' && in->name[in->len - 1] == '#') ||
+ in->name[strlen(in->name) - 1] == '~' ||
+ (in->name[0] == '#' && in->name[strlen(in->name) - 1] == '#') ||
in->name[0] == '.')
continue;
Hope that helps.
Andy
More information about the Dnsmasq-discuss
mailing list