aboutsummaryrefslogtreecommitdiff
path: root/src/tool_cb_dbg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tool_cb_dbg.c')
-rw-r--r--src/tool_cb_dbg.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tool_cb_dbg.c b/src/tool_cb_dbg.c
index 16bfb4208..c2dd51b7c 100644
--- a/src/tool_cb_dbg.c
+++ b/src/tool_cb_dbg.c
@@ -50,15 +50,15 @@ int tool_debug_cb(CURL *handle, curl_infotype type,
FILE *output = config->errors;
const char *text;
struct timeval tv;
- struct tm *now;
char timebuf[20];
time_t secs;
- static time_t epoch_offset;
- static int known_offset;
(void)handle; /* not used */
if(config->tracetime) {
+ struct tm *now;
+ static time_t epoch_offset;
+ static int known_offset;
tv = tvnow();
if(!known_offset) {
epoch_offset = time(NULL) - tv.tv_sec;
@@ -101,14 +101,14 @@ int tool_debug_cb(CURL *handle, curl_infotype type,
static const char * const s_infotype[] = {
"*", "<", ">", "{", "}", "{", "}"
};
- size_t i;
- size_t st = 0;
static bool newl = FALSE;
static bool traced_data = FALSE;
switch(type) {
case CURLINFO_HEADER_OUT:
if(size > 0) {
+ size_t st = 0;
+ size_t i;
for(i = 0; i < size - 1; i++) {
if(data[i] == '\n') { /* LF */
if(!newl) {