diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2004-11-12 21:15:21 +0000 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2004-11-12 21:15:21 +0000 |
commit | 35f08122fe2f801f067c223b08fe440cda5779ee (patch) | |
tree | 1dd336ecd08fdedf48a5b79d1b09d42e75e598b3 | |
parent | 85026c42ec8ff853e10f03d28c95c12433fa776e (diff) | |
download | fetchmail-35f08122fe2f801f067c223b08fe440cda5779ee.tar.gz fetchmail-35f08122fe2f801f067c223b08fe440cda5779ee.tar.bz2 fetchmail-35f08122fe2f801f067c223b08fe440cda5779ee.zip |
Replace sprintf.
svn path=/trunk/; revision=4004
-rw-r--r-- | env.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -302,8 +302,11 @@ char *visbuf(const char *buf) } else { - (void) sprintf(tp, "\\0x%02x", *buf++); - tp += strlen(tp); + const char hex[] = "0123456789abcdef"; + *tp++ = '\\'; *tp++ = '0'; *tp++ = 'x'; + *tp++ = hex[*buf >> 4]; + *tp++ = hex[*buf & 0xf]; + buf++; } } *tp++ = '\0'; |