Use PRIO_{MIN,MAX} instead of NZERO
Some systems do not define NZERO.  NZERO seems to be an XSI extension
and PRIO_{MIN,MAX} is not specified by POSIX but most relevant systems
define it.
			
			
This commit is contained in:
		
							
								
								
									
										2
									
								
								nice.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								nice.c
									
									
									
									
									
								
							| @@ -37,7 +37,7 @@ main(int argc, char *argv[]) | ||||
| 	val += getpriority(PRIO_PROCESS, 0); | ||||
| 	if (errno != 0) | ||||
| 		weprintf("getpriority:"); | ||||
| 	val = MAX(-NZERO, MIN(val, NZERO - 1)); | ||||
| 	val = MAX(PRIO_MIN, MIN(val, PRIO_MAX)); | ||||
| 	if (setpriority(PRIO_PROCESS, 0, val) != 0) | ||||
| 		weprintf("setpriority:"); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user