r14960: don't declare variables mid-function
authorAndrew Tridgell <tridge@samba.org>
Fri, 7 Apr 2006 11:44:55 +0000 (11:44 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:00:46 +0000 (14:00 -0500)
(This used to be commit 4537de9289ce025a240fe46a708434c195138d20)

source4/ntvfs/common/notify.c

index 452b8188f0c2ca5dcce489f9ca2c53b1a9cd6821..a70188070180d8cc1d436fb5f2a8d27ce5219c81 100644 (file)
@@ -609,9 +609,10 @@ void notify_trigger(struct notify_context *notify,
 
                while (min_i < max_i) {
                        struct notify_entry *e;
+                       int cmp;
                        i = (min_i+max_i)/2;
                        e = &d->entries[i];
-                       int cmp = strncmp(path, e->path, p_len);
+                       cmp = strncmp(path, e->path, p_len);
                        if (cmp == 0) {
                                if (p_len == e->path_len) {
                                        max_i = i;