? diff ? out ? auto.rc ? freeciv Index: client/clinet.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/clinet.c,v retrieving revision 1.67 diff -u -r1.67 clinet.c --- client/clinet.c 2002/03/05 15:46:19 1.67 +++ client/clinet.c 2002/03/05 15:54:22 @@ -556,7 +556,11 @@ #ifdef HAVE_FDOPEN f=fdopen(s,"r+"); - fwrite(str,1,strlen(str),f); + if (fwrite(str, 1, strlen(str), f) != strlen(str)) { + (void) mystrlcpy(errbuf, "Write error in create_server_list", n_errbuf); + fclose(f); + return NULL; + } fflush(f); #else { Index: client/goto.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/goto.c,v retrieving revision 1.38 diff -u -r1.38 goto.c --- client/goto.c 2002/02/26 19:57:08 1.38 +++ client/goto.c 2002/03/05 15:54:22 @@ -600,11 +600,9 @@ static unsigned char *get_drawn_char(int x, int y, int dir) { int x1, y1; - bool is_real; + bool is_real = normalize_map_pos(&x, &y); - /* Replace with check for is_normal_tile later */ - assert(is_real_tile(x, y)); - normalize_map_pos(&x, &y); + assert(is_real); is_real = MAPSTEP(x1, y1, x, y, dir); @@ -778,12 +776,13 @@ void draw_line(int dest_x, int dest_y) { int start_index; + bool is_real; assert(is_active); /* Replace with check for is_normal_tile later */ - assert(is_real_tile(dest_x, dest_y)); - normalize_map_pos(&dest_x, &dest_y); + is_real = normalize_map_pos(&dest_x, &dest_y); + assert(is_real); if (goto_map.vector[dest_x][dest_y] == 0) { undraw_line(); Index: client/mapview_common.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/mapview_common.c,v retrieving revision 1.11 diff -u -r1.11 mapview_common.c --- client/mapview_common.c 2002/02/26 19:57:08 1.11 +++ client/mapview_common.c 2002/03/05 15:54:23 @@ -55,8 +55,7 @@ assert(is_real_tile(x1, y1)); - if (is_real_tile(x2, y2)) { - normalize_map_pos(&x2, &y2); + if (normalize_map_pos(&x2, &y2)) { assert(is_tiles_adjacent(x1, y1, x2, y2)); if (map_get_tile(x2, y2)->known == TILE_UNKNOWN) { Index: client/options.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/options.c,v retrieving revision 1.51 diff -u -r1.51 options.c --- client/options.c 2002/03/05 15:46:20 1.51 +++ client/options.c 2002/03/05 15:54:23 @@ -241,10 +241,9 @@ append_output_window(_("Cannot find your home directory")); return NULL; } - mystrlcpy(name_buffer, name, 231); - sz_strlcat(name_buffer, "/.civclientrc"); + my_snprintf(name_buffer, sizeof(name_buffer), "%s/.civclientrc", name); #else - mystrlcpy(name_buffer,OPTION_FILE_NAME,sizeof(name_buffer)); + sz_strlcpy(name_buffer, OPTION_FILE_NAME); #endif } freelog(LOG_VERBOSE, "settings file is %s", name_buffer); Index: client/packhand.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/packhand.c,v retrieving revision 1.224 diff -u -r1.224 packhand.c --- client/packhand.c 2002/03/05 15:46:20 1.224 +++ client/packhand.c 2002/03/05 15:54:24 @@ -519,7 +519,6 @@ int d = (2 * r) + 1; int x = pcity->x - r; int y = pcity->y - r; - normalize_map_pos(&x, &y); update_map_canvas(x, y, d, d, TRUE); } else { refresh_tile_mapcanvas(pcity->x, pcity->y, TRUE); Index: server/barbarian.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/server/barbarian.c,v retrieving revision 1.53 diff -u -r1.53 barbarian.c --- server/barbarian.c 2002/03/05 15:46:25 1.53 +++ server/barbarian.c 2002/03/05 15:54:33 @@ -223,6 +223,8 @@ int xb = -1, yb = -1; unit_list_iterate(map_get_tile(x, y)->units, punit2) if( punit2->owner == me ) { + bool moved; + send_unit_info(NULL, punit2); while(TRUE) { rand_neighbour(x, y, &xu, &yu); @@ -234,12 +236,13 @@ } if (is_free_sea(xu, yu, barbarians)) { boat = find_a_unit_type(L_BARBARIAN_BOAT, -1); - create_unit( barbarians, xu, yu, boat, FALSE, 0, -1); + (void) create_unit( barbarians, xu, yu, boat, FALSE, 0, -1); xb = xu; yb = yu; break; } } - handle_unit_move_request(punit2, xu, yu, TRUE, FALSE); + moved = handle_unit_move_request(punit2, xu, yu, TRUE, FALSE); + assert(moved); } unit_list_iterate_end; } Index: server/gamehand.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/server/gamehand.c,v retrieving revision 1.109 diff -u -r1.109 gamehand.c --- server/gamehand.c 2002/03/05 15:46:26 1.109 +++ server/gamehand.c 2002/03/05 15:54:37 @@ -113,7 +113,7 @@ do { dx = x + myrand(2 * game.dispersion + 1) - game.dispersion; dy = y + myrand(2 * game.dispersion + 1) - game.dispersion; - normalize_map_pos(&dx, &dy); + (void) normalize_map_pos(&dx, &dy); } while (!(is_real_tile(dx, dy) && map_get_continent(x, y) == map_get_continent(dx, dy) && map_get_terrain(dx, dy) != T_OCEAN