From: Ted Lemon Date: Thu, 25 Jan 2001 08:35:24 +0000 (+0000) Subject: Don't use snprintf on platforms that don't have it. X-Git-Tag: V3-BETA-2-PATCH-15~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f236d89ed4f20038fac5665d1caf8ed3d18768c;p=thirdparty%2Fdhcp.git Don't use snprintf on platforms that don't have it. --- diff --git a/server/failover.c b/server/failover.c index ee1880685..8f1aec30d 100644 --- a/server/failover.c +++ b/server/failover.c @@ -43,7 +43,7 @@ #ifndef lint static char copyright[] = -"$Id: failover.c,v 1.31 2001/01/19 11:06:45 mellon Exp $ Copyright (c) 1999-2001 The Internet Software Consortium. All rights reserved.\n"; +"$Id: failover.c,v 1.32 2001/01/25 08:35:24 mellon Exp $ Copyright (c) 1999-2001 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -3954,10 +3954,17 @@ isc_result_t dhcp_failover_process_bind_update (dhcp_failover_state_t *state, msg -> binding_status)); if (new_binding_state != msg -> binding_status) { char outbuf [100]; +#if defined (HAVE_SNPRINTF) snprintf (outbuf, sizeof outbuf, "invalid state transition: %d to %d", lease -> binding_state, msg -> binding_status); +#else + sprintf (outbuf, + "invalid state transition: %d to %d", + lease -> binding_state, + msg -> binding_status); +#endif dhcp_failover_send_bind_ack (state, lease, msg, FTR_FATAL_CONFLICT, outbuf);