mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-27 00:21:15 -03:00
Use -1 instead of 0 for the notifyd token "missing value" sentinel
This matches NOTIFY_TOKEN_INVALID
This commit is contained in:
@@ -1276,14 +1276,14 @@ class universal_notifier_notifyd_t : public universal_notifier_t
|
||||
}
|
||||
|
||||
public:
|
||||
universal_notifier_notifyd_t() : notify_fd(-1), token(0)
|
||||
universal_notifier_notifyd_t() : notify_fd(-1), token(-1 /* NOTIFY_TOKEN_INVALID */)
|
||||
{
|
||||
setup_notifyd();
|
||||
}
|
||||
|
||||
~universal_notifier_notifyd_t()
|
||||
{
|
||||
if (token != 0)
|
||||
if (token != -1 /* NOTIFY_TOKEN_INVALID */)
|
||||
{
|
||||
#if FISH_NOTIFYD_AVAILABLE
|
||||
notify_cancel(token);
|
||||
|
||||
Reference in New Issue
Block a user