Re: [PATCH] remove global vars in fish.c

On Tue, 9 Sep 2003, Jindrich Makovicka wrote:

> Hi,
> this patch removes the two remaining static globals in vfs/fish.c:
> 1) force_expiration is unused anyway;

Yes, but please look beyond that piece of code.  There is also
force_expiration in ftpfs.c, and it's used in ftpfs_flushdir().  This
function is called by update_one_panel_widget().  See FIXME in that code:

/* FIXME: Should supply flushdir method */

I think mc_ctl() could be used to access this method outside VFS.

> 2) reply_str is replaced by an additional parameter in command().

Please avoid random constants like 80.  Either allocate enough memory for
any reply, or set a limit as a preprocessor define, e.g.

#define MAX_REPLY_LEN 80

Pavel Roskin

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]