Re: [PATCH 19/23] fsm-health-win32: force shutdown daemon if worktree root moves

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 2/24/22 11:09 AM, Derrick Stolee wrote:
On 2/15/2022 10:59 AM, Jeff Hostetler via GitGitGadget wrote:
From: Jeff Hostetler <jeffhost@xxxxxxxxxxxxx>
diff --git a/compat/fsmonitor/fsm-health-win32.c b/compat/fsmonitor/fsm-health-win32.c
index 3c3453369cd..2526ad9194f 100644
--- a/compat/fsmonitor/fsm-health-win32.c
+++ b/compat/fsmonitor/fsm-health-win32.c
@@ -14,7 +14,10 @@ enum interval_fn_ctx { CTX_INIT = 0, CTX_TERM, CTX_TIMER };
  typedef int (interval_fn)(struct fsmonitor_daemon_state *state,
  			  enum interval_fn_ctx ctx);
+static interval_fn has_worktree_moved;
+
  static interval_fn *table[] = {
+	has_worktree_moved,
  	NULL, /* must be last */
  };

Looking at this now, I think table[] should be defined immediately
before fsm_health__loop() so it is easier to see how they interact.
It also avoids this static declaration of the function before its
implementation.

Or, is there a reason it is so high up in the file?

I don't think so.  I was trying to keep all of the public API
routines at the bottom, but all of the static stuff is pretty
much free to move around.

I'll revisit.

Thanks
Jeff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux