]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/rendezvous.c
Use some more specific data types (e. g. pid_t vs. int), make "SPLint" happy :-)
[ngircd-alex.git] / src / ngircd / rendezvous.c
index e056e726ce8589eef6706cd024c5d159d9dae1dc..7c106292b068dfa5c68fd7dc2dd38f368446dbe0 100644 (file)
@@ -21,7 +21,7 @@
 #ifdef ZEROCONF
 
 
-static char UNUSED id[] = "$Id: rendezvous.c,v 1.7 2005/07/31 20:13:08 alex Exp $";
+static char UNUSED id[] = "$Id: rendezvous.c,v 1.8 2006/05/10 21:24:01 alex Exp $";
 
 #include "imp.h"
 #include <assert.h>
@@ -144,7 +144,7 @@ GLOBAL void Rendezvous_Exit( void )
 } /* Rendezvous_Exit */
 
 
-GLOBAL bool Rendezvous_Register( char *Name, char *Type, unsigned int Port )
+GLOBAL bool Rendezvous_Register( char *Name, char *Type, UINT16 Port )
 {
        /* Register new service */
 
@@ -310,7 +310,8 @@ static void Registration_Reply_Handler( DNSServiceRegistrationReplyErrorType Err
                        strcpy( txt, "name conflict!" );
                        break;
                default:
-                       sprintf( txt, "error code %ld!", (long)ErrCode );
+                       snprintf(txt, sizeof txt, "error code %ld!",
+                                (long)ErrCode);
        }
 
        Log( LOG_INFO, "Can't register \"%s\" with Rendezvous: %s", s->Desc, txt );
@@ -347,7 +348,8 @@ static sw_result HOWL_API Registration_Reply_Handler( sw_discovery Session, sw_d
                        strcpy( txt, "name conflict!" );
                        break;
                default:
-                       sprintf( txt, "error code %ld!", (long)Status );
+                       snprintf(txt, sizeof txt, "error code %ld!",
+                                (long)Status);
        }
 
        Log( LOG_INFO, "Can't register \"%s\" with Rendezvous: %s", s->Desc, txt );