From 32c4fd9d26308fe8161da2e6bba6d18e0b6af7b7 Mon Sep 17 00:00:00 2001 From: Per Cederqvist <ceder@lysator.liu.se> Date: Wed, 8 Jul 1998 16:54:11 +0000 Subject: [PATCH] (prot_a_output_conf_list): Changed type of local variable "i" from int to unsigned long. (prot_a_output_text_list): Likewise. (prot_a_output_time): Renamed local variable names to avoid warnings from gcc. (rcsid): Added a missing const. --- src/server/prot-a-output.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/src/server/prot-a-output.c b/src/server/prot-a-output.c index afbc08031..9029ae22e 100644 --- a/src/server/prot-a-output.c +++ b/src/server/prot-a-output.c @@ -1,5 +1,5 @@ /* - * $Id: prot-a-output.c,v 0.28 1998/06/14 14:51:01 byers Exp $ + * $Id: prot-a-output.c,v 0.29 1998/07/08 16:54:11 ceder Exp $ * Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996 Lysator Academic Computer Association. * * This file is part of the LysKOM server. @@ -28,7 +28,8 @@ * Written by ceder 1990-07-13 */ -static char *rcsid = "$Id: prot-a-output.c,v 0.28 1998/06/14 14:51:01 byers Exp $"; +static const char * +rcsid = "$Id: prot-a-output.c,v 0.29 1998/07/08 16:54:11 ceder Exp $"; #include "rcs.h" USE(rcsid); @@ -171,7 +172,7 @@ void prot_a_output_conf_list(Connection *fp, Conf_list_old conf_list) { - int i; + unsigned long i; mux_printf(fp, " %lu", (unsigned long)conf_list.no_of_conf_nos); if ( conf_list.conf_nos != NULL && conf_list.no_of_conf_nos > 0 ) @@ -380,7 +381,7 @@ void prot_a_output_text_list(Connection *fp, Text_list text_list) { - int i; + unsigned long i; mux_printf(fp, " %lu %lu", (unsigned long)text_list.first_local_no, @@ -752,22 +753,22 @@ prot_a_output_misc_info(Connection *fp, void prot_a_output_time(Connection *fp, - time_t clock) + time_t clk) { - struct tm *time; + struct tm *t; - time = localtime( &clock ); + t = localtime( &clk ); mux_printf(fp, " %lu %lu %lu %lu %lu %lu %lu %lu %lu", - (unsigned long) time -> tm_sec, - (unsigned long) time -> tm_min, - (unsigned long) time -> tm_hour, - (unsigned long) time -> tm_mday, - (unsigned long) time -> tm_mon, - (unsigned long) time -> tm_year, - (unsigned long) time -> tm_wday, - (unsigned long) time -> tm_yday, - (unsigned long) time -> tm_isdst); + (unsigned long) t -> tm_sec, + (unsigned long) t -> tm_min, + (unsigned long) t -> tm_hour, + (unsigned long) t -> tm_mday, + (unsigned long) t -> tm_mon, + (unsigned long) t -> tm_year, + (unsigned long) t -> tm_wday, + (unsigned long) t -> tm_yday, + (unsigned long) t -> tm_isdst); } -- GitLab