Blame SOURCES/tftp-rewrite-macro.patch

52b646
Resolves: #1485943
52b646
52b646
--- a/tftpd/tftpd.c       2017-08-28 09:12:11.681299000 +0200
52b646
+++ b/tftpd/tftpd.c       2017-08-28 13:30:03.109312000 +0200
52b646
@@ -1388,24 +1388,25 @@
52b646
             return strlen(p);
52b646
 
52b646
     case 'x':
52b646
-        if (output) {
52b646
-            if (from.sa.sa_family == AF_INET) {
52b646
+        if (from.sa.sa_family == AF_INET) {
52b646
+            if (output) {
52b646
                 sprintf(output, "%08lX",
52b646
                     (unsigned long)ntohl(from.si.sin_addr.s_addr));
52b646
-                l = 8;
52b646
+            }
52b646
+            l = 8;
52b646
 #ifdef HAVE_IPV6
52b646
-            } else {
52b646
-                unsigned char *c = (unsigned char *)SOCKADDR_P(&from;;
52b646
-                p = tb;
52b646
-                for (l = 0; l < 16; l++) {
52b646
-                    sprintf(p, "%02X", *c);
52b646
-                    c++;
52b646
-                    p += 2;
52b646
-                }
52b646
+        } else {
52b646
+            unsigned char *c = (unsigned char *)SOCKADDR_P(&from;;
52b646
+            p = tb;
52b646
+            for (l = 0; l < 16; l++) {
52b646
+                sprintf(p, "%02X", *c);
52b646
+                c++;
52b646
+                p += 2;
52b646
+            }
52b646
+            if (output)
52b646
                 strcpy(output, tb);
52b646
-                l = strlen(tb);
52b646
+            l = strlen(tb);
52b646
 #endif
52b646
-            }
52b646
         }
52b646
         return l;
52b646
 
52b646