[Pkg-wmaker-commits] [wmtop] 05/11: wmtop: Switch user variable from int to uid_t.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Mon Feb 8 15:03:20 UTC 2016


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch upstream
in repository wmtop.

commit 5632ca654061fa437d550e124cab8a2f4a148776
Author: Doug Torrance <dtorrance at piedmont.edu>
Date:   Sun Feb 7 21:36:20 2016 -0500

    wmtop: Switch user variable from int to uid_t.
    
    Fixes 'comparison between signed and unsigned integer expressions' compiler
    warnings.
---
 wmtop.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/wmtop.c b/wmtop.c
index ac4bf33..a1409de 100644
--- a/wmtop.c
+++ b/wmtop.c
@@ -96,7 +96,7 @@
 /******************************************/
 
 regex_t *exclusion_expression = 0;
-int user = -1;
+uid_t user = (uid_t) -1;
 char *process_command = 0;
 /*
  * Default mode: zero=cpu one=memory
@@ -431,7 +431,7 @@ void wmtop_routine(int argc, char **argv) {
 			mode = !mode;
 #endif
 		    if (Event.xbutton.button==2) {
-			if (user==-1)
+			if (user==(uid_t)-1)
 			    user=getuid();
 			else
 			    user=-1;
@@ -478,7 +478,7 @@ int process_parse_procfs(struct process *process) {
     /*
      * Permissions of /proc filesystem are permissions of process too
      */
-    if (user>=0) {
+    if (user!=(uid_t)-1) {
 	stat(filename,&sbuf);
 	if (sbuf.st_uid!=user)
 	    return 1;
@@ -523,7 +523,7 @@ int process_parse_procfs(struct process *process) {
       /*
        * Permissions of /proc filesystem are permissions of process too
        */
-      if (user>=0) {
+      if (user!=(uid_t)-1) {
         stat(filename,&sbuf);
         if (sbuf.st_uid!=user)
             return 1;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmtop.git



More information about the Pkg-wmaker-commits mailing list