Fix all spelling errors found by codespell.
[tinc] / src / invitation.c
index d6f00a5..c667a6e 100644 (file)
@@ -769,13 +769,19 @@ make_names:
 
                l[len] = 0;
 
+               // Ignore lines with empty variable names
+               if(!*l) {
+                       continue;
+               }
+
                // Is it a Name?
-               if(!strcasecmp(l, "Name"))
+               if(!strcasecmp(l, "Name")) {
                        if(strcmp(value, name)) {
                                break;
                        } else {
                                continue;
-                       } else if(!strcasecmp(l, "NetName")) {
+                       }
+               } else if(!strcasecmp(l, "NetName")) {
                        continue;
                }
 
@@ -1059,7 +1065,7 @@ static bool invitation_receive(void *handle, uint8_t type, const void *msg, uint
                return finalize_join();
 
        case 2:
-               fprintf(stderr, "Invitation succesfully accepted.\n");
+               fprintf(stderr, "Invitation successfully accepted.\n");
                shutdown(sock, SHUT_RDWR);
                success = true;
                break;