diff options
author | Stefan Metzmacher <metze@samba.org> | 2008-02-28 08:29:07 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2008-02-28 09:50:27 +0100 |
commit | d43aa3ee3a062dfcbab2f3429af1ce491c6c985d (patch) | |
tree | ab473eec2941759c3f4214266aa2a5cdda9ae572 /source3 | |
parent | 346993ee759c10a65cb22821cafc315186281e59 (diff) | |
download | samba-d43aa3ee3a062dfcbab2f3429af1ce491c6c985d.tar.gz samba-d43aa3ee3a062dfcbab2f3429af1ce491c6c985d.tar.bz2 samba-d43aa3ee3a062dfcbab2f3429af1ce491c6c985d.zip |
call libnet_conf_get_seqnum() just once and fix compiler warnings
metze
(This used to be commit fb352fdbcc3fe378d2aadc4914b981eaa06b35ae)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/param/loadparm.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 79c522f77c..e23c30789a 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -3490,6 +3490,7 @@ bool lp_file_list_changed(void) DEBUG(6, ("lp_file_list_changed()\n")); if (lp_config_backend() == CONFIG_BACKEND_REGISTRY) { + uint64_t conf_cur_seqnum; if (conf_ctx == NULL) { WERROR werr; werr = libnet_conf_open(NULL, &conf_ctx); @@ -3499,12 +3500,12 @@ bool lp_file_list_changed(void) return false; } } - if (conf_last_seqnum != - libnet_conf_get_seqnum(conf_ctx, NULL, NULL)) - { - DEBUGADD(6, ("regdb seqnum changed: old = %lu, " - "new = %lu\n", conf_last_seqnum, - libnet_conf_get_seqnum(conf_ctx, NULL, NULL))); + conf_cur_seqnum = libnet_conf_get_seqnum(conf_ctx, NULL, NULL); + if (conf_last_seqnum != conf_cur_seqnum) { + DEBUGADD(6, ("regdb seqnum changed: old = %llu, " + "new = %llu\n", + (unsigned long long)conf_last_seqnum, + (unsigned long long)conf_cur_seqnum)); return true; } else { /* |