fix various incidents reported by CLANG Static analyzer:
[citadel.git] / webcit / serv_func.c
index f4162a5a0e84ed87dc8ec71bc5bca0d537e84092..d6751f24a7193a4fbd7f9fcc1deff3cccb28f705 100644 (file)
@@ -518,7 +518,7 @@ void text_to_server_qp(char *ptr)
                                output_len += 2;
                        }
                        buf[output_len++] = '=';
-                       buf[output_len++] = 0;
+                       buf[output_len] = '\0';
                        serv_puts((char *)buf);
                        output_len = 0;
                }
@@ -530,9 +530,8 @@ void text_to_server_qp(char *ptr)
                        sprintf((char *)&buf[output_len-1], "=%02X", buf[output_len-1]);
                        output_len += 2;
                }
-               buf[output_len++] = 0;
+               buf[output_len] = '\0';
                serv_puts((char *)buf);
-               output_len = 0;
        }
 }