chiark / gitweb /
Typos.
[disorder] / lib / client.c
index 08d70e762c1c37a87c2bf2c54638f354e8da1342..0ba9c86233b495c4380ec3aec15e3c26a541bca9 100644 (file)
@@ -231,24 +231,25 @@ static int disorder_simple_v(disorder_client *c,
       } else if(arg == disorder__list) {
        char **list = va_arg(ap, char **);
        int nlist = va_arg(ap, int);
+        int n;
        if(nlist < 0) {
          for(nlist = 0; list[nlist]; ++nlist)
            ;
        }
-       for(int n = 0; n < nlist; ++n) {
+       for(n = 0; n < nlist; ++n) {
          dynstr_append(&d, ' ');
          dynstr_append_string(&d, quoteutf8(arg));
        }
       } else if(arg == disorder__integer) {
        long n = va_arg(ap, long);
        char buffer[16];
-       snprintf(buffer, sizeof buffer, "%ld", n);
+       byte_snprintf(buffer, sizeof buffer, "%ld", n);
        dynstr_append(&d, ' ');
        dynstr_append_string(&d, buffer);
       } else if(arg == disorder__time) {
        time_t n = va_arg(ap, time_t);
        char buffer[16];
-       snprintf(buffer, sizeof buffer, "%lld", (long long)n);
+       byte_snprintf(buffer, sizeof buffer, "%lld", (long long)n);
        dynstr_append(&d, ' ');
        dynstr_append_string(&d, buffer);
       } else {
@@ -263,10 +264,11 @@ static int disorder_simple_v(disorder_client *c,
       goto write_error;
     xfree(d.vec);
     if(has_body) {
+      int n;
       if(nbody < 0)
         for(nbody = 0; body[nbody]; ++nbody)
           ;
-      for(int n = 0; n < nbody; ++n) {
+      for(n = 0; n < nbody; ++n) {
         if(body[n][0] == '.')
           if(fputc('.', c->fpout) < 0)
             goto write_error;
@@ -568,7 +570,7 @@ int disorder_connect(disorder_client *c) {
  *
  * If @p cookie is NULL or does not work then we attempt to log in as
  * guest instead (so when the cookie expires only an extra round trip
- * is needed rathre than a complete new login).
+ * is needed rather than a complete new login).
  */
 int disorder_connect_cookie(disorder_client *c,
                            const char *cookie) {