Browse Source

mostly useless fixes

tonton Th 9 months ago
parent
commit
5e17585bea
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      guinnessd.c

+ 4
- 4
guinnessd.c View File

@@ -32,7 +32,7 @@
32 32
 #include "commands.h"
33 33
 #include "config.h"
34 34
 
35
-/* Config spécifique  serveur */
35
+/* Config specifique  serveur */
36 36
 char *adr_ip       = NULL;
37 37
 int   port         = 0;
38 38
 int   online       = TRUE;
@@ -45,7 +45,7 @@ FILE *outerr       = NULL;
45 45
 Elt  *clients_list = NULL;
46 46
 Elt  *drinks_list  = NULL;
47 47
 
48
-/* Config spécifique connexion des clients */
48
+/* Config specifique connexion des clients */
49 49
 char *pseudo       = NULL;
50 50
 char *drink        = NULL;
51 51
 char *logout       = NULL;
@@ -315,7 +315,7 @@ int initiate (int socket_service, userinfos *infos) {
315 315
 
316 316
     pthread_mutex_lock (&mutex_clients);
317 317
     if (exist_elt (clients_list, infos->nom)) {
318
-        char nick_ok[MAXSTRLEN];
318
+        char nick_ok[MAXSTRLEN+1];
319 319
         snprintf (nick_ok, MAXSTRLEN, "@%s", infos->nom);
320 320
         snprintf (infos->nom, MAXSTRLEN, "%s", nick_ok);
321 321
         send_infos (socket_service, "@Pseudo déjà utilisé !\n");
@@ -504,7 +504,7 @@ void guinnessd_init (int argc, char *argv[]) {
504 504
 int main (int argc, char *argv[]) {
505 505
     int                  socket_ecoute;
506 506
     int                  socket_service;
507
-    int                  lg_adresse = sizeof (struct sockaddr_in);
507
+    socklen_t            lg_adresse = sizeof (struct sockaddr_in);
508 508
     struct sockaddr_in   adresse;
509 509
     pthread_t            pthread_id;
510 510
 

Loading…
Cancel
Save