Use retval from sprintf while walking buffers
[exim.git] / src / src / auths / xtextencode.c
index 7cdfe322495504d9fe5b1890c7b380299e948e28..38237207efdca112ccf9cafca7f2fab2ad0bea40 100644 (file)
@@ -45,14 +45,10 @@ pp = code = store_get(count);
 p = (uschar *)clear;
 c = len;
 while (c-- > 0)
-  {
   if ((x = *p++) < 33 || x > 127 || x == '+' || x == '=')
-    {
-    sprintf(CS pp, "+%.02x", x);   /* There's always room */
-    pp += 3;
-    }
-  else *pp++ = x;
-  }
+    pp += sprintf(CS pp, "+%.02x", x);   /* There's always room */
+  else
+    *pp++ = x;
 
 *pp = 0;
 return code;