From a683f418a9151f24950317f8172adab70068ddd9 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 5 Aug 2006 20:48:16 +0000 Subject: [PATCH] Correct improperly formated list command output reported by Dan. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3249 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/kernstodo | 2 ++ bacula/src/cats/sql.c | 4 +--- bacula/src/lib/bsnprintf.c | 9 --------- bacula/technotes-1.39 | 2 ++ 4 files changed, 5 insertions(+), 12 deletions(-) diff --git a/bacula/kernstodo b/bacula/kernstodo index b2b20ac95a..be2860a656 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -25,6 +25,8 @@ Document: show index from File; - Correct the Include syntax in the m4.xxx files in examples/conf - Document JobStatus and Termination codes. +- Fix the error with the "DVI file can't be opened" while + building the French PDF. Priority: diff --git a/bacula/src/cats/sql.c b/bacula/src/cats/sql.c index 0ee91f8847..dc84a65941 100644 --- a/bacula/src/cats/sql.c +++ b/bacula/src/cats/sql.c @@ -501,11 +501,9 @@ list_result(JCR *jcr, B_DB *mdb, DB_LIST_HANDLER *send, void *ctx, e_list_type t send(ctx, "|"); sql_field_seek(mdb, 0); for (i = 0; i < sql_num_fields(mdb); i++) { - char fmtbuf[50]; Dmsg1(800, "list_result looking at field %d\n", i); field = sql_fetch_field(mdb); - bsnprintf(fmtbuf, sizeof(fmtbuf), "%%-%ds }", (int)field->max_length); - bsnprintf(buf, sizeof(buf), fmtbuf, field->name); + bsnprintf(buf, sizeof(buf), " %-*s |", (int)field->max_length, field->name); send(ctx, buf); } send(ctx, "\n"); diff --git a/bacula/src/lib/bsnprintf.c b/bacula/src/lib/bsnprintf.c index 77e320c9ae..4094e00283 100644 --- a/bacula/src/lib/bsnprintf.c +++ b/bacula/src/lib/bsnprintf.c @@ -112,7 +112,6 @@ int bvsnprintf(char *buffer, int32_t maxlen, const char *format, va_list args) int cflags; int32_t currlen; int base; - int junk; #ifdef FP_OUTPUT LDOUBLE fvalue; #endif @@ -168,11 +167,7 @@ int bvsnprintf(char *buffer, int32_t maxlen, const char *format, va_list args) min = 10 * min + char_to_int(ch); ch = *format++; } else if (ch == '*') { -#ifdef SECURITY_PROBLEM min = va_arg(args, int); -#else - junk = va_arg(args, int); -#endif ch = *format++; state = DP_S_DOT; } else @@ -193,11 +188,7 @@ int bvsnprintf(char *buffer, int32_t maxlen, const char *format, va_list args) max = 10 * max + char_to_int(ch); ch = *format++; } else if (ch == '*') { -#ifdef SECURITY_PROBLEM max = va_arg(args, int); -#else - junk = va_arg(args, int); -#endif ch = *format++; state = DP_S_MOD; } else diff --git a/bacula/technotes-1.39 b/bacula/technotes-1.39 index 90f8616c53..8ac1fc27df 100644 --- a/bacula/technotes-1.39 +++ b/bacula/technotes-1.39 @@ -1,6 +1,8 @@ Technical notes on version 1.39 General: +05Aug06 +kes Correct improperly formated list command output reported by Dan. 04Aug06 kes Correct despool time calculation. 03Aug06 -- 2.39.5