From a096270c77b1f6461a2ef58660ad9cfa9cbb32bb Mon Sep 17 00:00:00 2001 From: Flavio Cruz Date: Sat, 8 Apr 2023 01:03:31 -0400 Subject: Further modernize Hurd code by enforcing strict prototypes and no implicit function declarations. Most of the changes land in one of these buckets: * Removed unused declarations. * Used (void) to represent no parameters instead of () which means an undeterminate number of parameters. * Included missing header files whenever necessary (stdlib.h, sys/mman.h, etc) * Typedefed function pointers to be able to fully declare the parameter types. * Added declarations of library functions that are used elsewhere (example is libps/ps.h). * Made functions static whenever they are only used in that file. * Forwarded declarations of some methods that were made static. Message-Id: --- nfs/main.c | 2 +- nfs/mount.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'nfs') diff --git a/nfs/main.c b/nfs/main.c index 9ea6f0bc..3f4365c7 100644 --- a/nfs/main.c +++ b/nfs/main.c @@ -39,7 +39,7 @@ int main_udp_socket; char *hostname; volatile struct mapped_time_value *mapped_time; -extern char *localhost (); +extern char *localhost (void); /* Default number of times to retry RPCs when mounted soft. */ #define DEFAULT_SOFT_RETRIES 3 diff --git a/nfs/mount.c b/nfs/mount.c index f8318c27..45a2ad4f 100644 --- a/nfs/mount.c +++ b/nfs/mount.c @@ -18,13 +18,11 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */ -#define malloc a_byte_for_every_bozotic_sun_lossage_and_youd_need_a_lotta_ram #include #include +#include #undef TRUE /* Get rid of sun defs. */ #undef FALSE -#undef malloc -#include #include #include #include -- cgit v1.2.3