garten

diff growth.c @ 17:5e6c9260913a

lots of cleanups and small fixes
author meillo@marmaro.de
date Wed, 23 Jul 2008 17:14:38 +0200
parents 8db6497d6065
children 5937504619f2
line diff
     1.1 --- a/growth.c	Wed Jul 23 16:49:10 2008 +0200
     1.2 +++ b/growth.c	Wed Jul 23 17:14:38 2008 +0200
     1.3 @@ -5,14 +5,13 @@
     1.4  
     1.5  
     1.6  void grow_plants() {
     1.7 -	/* get weather and last environments to calculate the next one */
     1.8 -	sprintf(query, "update field \
     1.9 -			set age = age+1, size = size+1 ");
    1.10 -	stmt = db_query(query);
    1.11 +	sprintf(query,
    1.12 +			"update field "
    1.13 +			"set age = age+1, size = size+1 "
    1.14 +			);
    1.15  	if (!db_update(query)) {
    1.16 -		printf("E: update failed  ++  %s\n", sqlite3_errmsg(db));
    1.17 +		db_error("grow plants");
    1.18  	}
    1.19 -	sqlite3_finalize(stmt);
    1.20  }
    1.21  
    1.22