[PATCH 3/4] restorecond: fix type of utmpwatcher_handle()

Stephen Smalley <[email protected]>
Newsgroups org.kernel.vger.selinux
Message-ID <[email protected]>
utmpwatcher_handle() returns -1 in some cases and the caller has a
switch statement on it that compares with -1. Switch the return type
to just int rather than unsigned int to more accurately reflect the
interface.

Signed-off-by: Stephen Smalley <[email protected]>
---
 restorecond/utmpwatcher.c | 2 +-
 restorecond/utmpwatcher.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/restorecond/utmpwatcher.c b/restorecond/utmpwatcher.c
index c60fe0e5..e0cb48d6 100644
--- a/restorecond/utmpwatcher.c
+++ b/restorecond/utmpwatcher.c
@@ -45,7 +45,7 @@
 static struct stringsList *utmp_ptr = NULL;
 static int utmp_wd = -1;
 
-unsigned int utmpwatcher_handle(int inotify_fd, int wd)
+int utmpwatcher_handle(int inotify_fd, int wd)
 {
 	int changed = 0;
 	struct utmp u;
diff --git a/restorecond/utmpwatcher.h b/restorecond/utmpwatcher.h
index 19880108..19178f3c 100644
--- a/restorecond/utmpwatcher.h
+++ b/restorecond/utmpwatcher.h
@@ -23,7 +23,7 @@
 #ifndef UTMPWATCHER_H
 #define UTMPWATCHER_H
 
-unsigned int utmpwatcher_handle(int inotify_fd, int wd);
+int utmpwatcher_handle(int inotify_fd, int wd);
 void utmpwatcher_add(int inotify_fd, const char *path);
 void utmpwatcher_free(void);
 
-- 
2.55.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.