aboutsummaryrefslogtreecommitdiffhomepage
path: root/proc.c
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-04-28 23:21:37 +1000
committerGravatar axel <axel@liljencrantz.se>2006-04-28 23:21:37 +1000
commitd690a15b29e69b2dcd762541e5ed708c4f304c27 (patch)
tree954a1ef4ee75671a36c49017beec7694dee5b111 /proc.c
parent445f6539cf3d2cfcc0ff36db24ede8bb5415c5ed (diff)
Make job id numbering start from 1, not 0
darcs-hash:20060428132137-ac50b-8e5adcdbc18ad7627b66e9129a13b037a669dd02.gz
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/proc.c b/proc.c
index 79e89950..b3519e2d 100644
--- a/proc.c
+++ b/proc.c
@@ -182,7 +182,7 @@ int proc_get_last_status()
job_t *job_create()
{
- int free_id=0;
+ int free_id=1;
job_t *res;
while( job_get( free_id ) != 0 )
@@ -204,7 +204,7 @@ job_t *job_create()
job_t *job_get( int id )
{
job_t *res = first_job;
- if( id == -1 )
+ if( id <= 0 )
{
return res;
}