Cleanup save_formats() by removing unused function argument.

git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@238 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
Kevin Easton
2013-06-16 12:21:03 +00:00
parent bad477f9dc
commit ceb0492734
4 changed files with 12 additions and 11 deletions

View File

@@ -1,5 +1,7 @@
[Changes 1.2c01] [Changes 1.2c01]
* Cleanup save_formats(). (caf)
* Fix off-by-one error in add_socketread() and set_socketwrite() found * Fix off-by-one error in add_socketread() and set_socketwrite() found
by Coverity. (caf) by Coverity. (caf)

View File

@@ -798,8 +798,9 @@ void create_fsets(Window *win, int ansi)
#endif #endif
} }
int save_formats(FILE *outfile) int save_formats(void)
{ {
FILE *outfile;
char thefile[BIG_BUFFER_SIZE+1]; char thefile[BIG_BUFFER_SIZE+1];
char *p; char *p;
int i; int i;
@@ -813,10 +814,10 @@ FsetNumber *tmp;
#endif #endif
p = expand_twiddle(thefile); p = expand_twiddle(thefile);
outfile = fopen(p, "w"); outfile = fopen(p, "w");
new_free(&p);
if (!outfile) if (!outfile)
{ {
bitchsay("Cannot open file %s for saving!", thefile); bitchsay("Cannot open file %s for saving!", thefile);
new_free(&p);
return 1; return 1;
} }
for (i = 0; i < NUMBER_OF_FSET; i++) for (i = 0; i < NUMBER_OF_FSET; i++)
@@ -835,7 +836,6 @@ FsetNumber *tmp;
fclose(outfile); fclose(outfile);
bitchsay("Saved %d formats to %s", count, thefile); bitchsay("Saved %d formats to %s", count, thefile);
new_free(&p);
return 0; return 0;
} }

View File

@@ -93,7 +93,7 @@ extern AJoinList *ajoin_list;
extern void save_idle (FILE *); extern void save_idle (FILE *);
extern void save_banwords (FILE *); extern void save_banwords (FILE *);
extern int save_formats (FILE *); extern int save_formats (void);
extern void sync_nicklist (UserList *, int); extern void sync_nicklist (UserList *, int);
extern void sync_shitlist (ShitList *, int); extern void sync_shitlist (ShitList *, int);
@@ -1671,7 +1671,7 @@ BUILT_IN_COMMAND(savelists)
/* this looks like a bug but it isn't. formats are saved in a /* this looks like a bug but it isn't. formats are saved in a
* differant file altogether. * differant file altogether.
*/ */
save_formats(outfile); save_formats();
#endif #endif
} }

View File

@@ -82,7 +82,6 @@ static void set_ov_mode (Window *, char *, int);
static void set_away_time (Window *, char *, int); static void set_away_time (Window *, char *, int);
static void reinit_screen (Window *, char *, int); static void reinit_screen (Window *, char *, int);
void reinit_status (Window *, char *, int); void reinit_status (Window *, char *, int);
int save_formats (FILE *);
static void set_clock_format (Window *, char *, int); static void set_clock_format (Window *, char *, int);
void create_fsets (Window *, int); void create_fsets (Window *, int);
void setup_ov_mode (int, int, int); void setup_ov_mode (int, int, int);