[BACK]Return to renice.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / renice

Diff for /src/usr.bin/renice/renice.c between version 1.21 and 1.22

version 1.21, 2019/01/25 00:19:26 version 1.22, 2022/08/12 00:24:07
Line 155 
Line 155 
 static int  static int
 renice(struct renice_param *p, struct renice_param *end)  renice(struct renice_param *p, struct renice_param *end)
 {  {
         int new, old, errors = 0;          int new, old, error = 0;
   
         for (; p < end; p++) {          for (; p < end; p++) {
                 errno = 0;                  errno = 0;
                 old = getpriority(p->id_type, p->id);                  old = getpriority(p->id_type, p->id);
                 if (errno) {                  if (errno) {
                         warn("getpriority: %d", p->id);                          warn("getpriority: %d", p->id);
                         errors++;                          error = 1;
                         continue;                          continue;
                 }                  }
                 if (p->pri_type == RENICE_INCREMENT)                  if (p->pri_type == RENICE_INCREMENT)
Line 171 
Line 171 
                     p->pri < PRIO_MIN ? PRIO_MIN : p->pri;                      p->pri < PRIO_MIN ? PRIO_MIN : p->pri;
                 if (setpriority(p->id_type, p->id, new) == -1) {                  if (setpriority(p->id_type, p->id, new) == -1) {
                         warn("setpriority: %d", p->id);                          warn("setpriority: %d", p->id);
                         errors++;                          error = 1;
                         continue;                          continue;
                 }                  }
                 printf("%d: old priority %d, new priority %d\n",                  printf("%d: old priority %d, new priority %d\n",
                     p->id, old, new);                      p->id, old, new);
         }          }
         return (errors);          return error;
 }  }
   
 __dead void  __dead void

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22