]> granicus.if.org Git - procps-ng/commitdiff
64-bit time for Linux 2.5.xx
authoralbert <>
Wed, 29 May 2002 18:49:13 +0000 (18:49 +0000)
committeralbert <>
Wed, 29 May 2002 18:49:13 +0000 (18:49 +0000)
ps/global.c
ps/output.c

index 640978f02cf532b7e0972e1aacd42fef7ebff495..f91855196f0aa8ec7354eda3a1759eefa13c0aa1 100644 (file)
@@ -412,7 +412,7 @@ void self_info(void){
 /*  open_psdb(namelist_file); */
   fprintf(stderr,
     "personality=0x%08x (from \"%s\")\n"
-    "EUID=%d TTY=%d,%d Hertz=%ld\n"
+    "EUID=%d TTY=%d,%d Hertz=%Ld\n"
 /*    "namelist_file=\"%s\"\n" */
     ,
     personality, saved_personality_text,
index bd9bc89a4333986863b35d2a449fb524fa5a42af..c30d42a7ad33b84d373ae104ae897999057a72c7 100644 (file)
@@ -586,7 +586,7 @@ static int pr_s(void){
 static int pr_flag(void){
     /* Unix98 requires octal flags */
     /* this user-hostile and volatile junk gets 1 character */
-    return snprintf(outbuf, COLWID, "%o", (pp->flags>>6)&0x7);
+    return snprintf(outbuf, COLWID, "%o", (unsigned)(pp->flags>>6U)&0x7U);
 }
 
 static int pr_euid(void){
@@ -625,7 +625,7 @@ static int old_time_helper(char *dst, unsigned long long t, unsigned long long r
   if(t == ~0ULL)    return snprintf(dst, COLWID, "   xx");
   if((long long)(t-=rel) < 0)  t=0ULL;
   if(t>9999ULL)     return snprintf(dst, COLWID, "%5Lu", t/100ULL);
-  else              return snprintf(dst, COLWID, "%2lu.%02lu", (unsigned)t/100U, (unsigned)t%100U);
+  else              return snprintf(dst, COLWID, "%2u.%02u", (unsigned)t/100U, (unsigned)t%100U);
 }
 
 static int pr_bsdtime(void){