X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fcats%2Fsql_get.c;h=4f60b7f4422b30047515e7be8f2509602b48799b;hb=2111894da0ca8e8aba85439de9a059638343e433;hp=2414a1392a176ebe12d6d6f836ecca364610ef4d;hpb=f866471b6a9d95d7a9229e75b260e08d9ac9829a;p=bacula%2Fbacula diff --git a/bacula/src/cats/sql_get.c b/bacula/src/cats/sql_get.c index 2414a1392a..4f60b7f442 100644 --- a/bacula/src/cats/sql_get.c +++ b/bacula/src/cats/sql_get.c @@ -2,7 +2,6 @@ Bacula(R) - The Network Backup Solution Copyright (C) 2000-2015 Kern Sibbald - Copyright (C) 2000-2014 Free Software Foundation Europe e.V. The original author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -177,7 +176,6 @@ int BDB::bdb_get_filename_record(JCR *jcr) { SQL_ROW row; int FilenameId = 0; - int num_rows; esc_name = check_pool_memory_size(esc_name, 2*fnl+2); bdb_escape_string(jcr, esc_name, fname, fnl); @@ -185,13 +183,12 @@ int BDB::bdb_get_filename_record(JCR *jcr) Mmsg(cmd, "SELECT FilenameId FROM Filename WHERE Name='%s'", esc_name); if (QueryDB(jcr, cmd)) { char ed1[30]; - num_rows = sql_num_rows(); - if (num_rows > 1) { + if (sql_num_rows() > 1) { Mmsg2(errmsg, _("More than one Filename!: %s for file: %s\n"), - edit_uint64(num_rows, ed1), fname); + edit_uint64(sql_num_rows(), ed1), fname); Jmsg(jcr, M_WARNING, 0, "%s", errmsg); } - if (num_rows >= 1) { + if (sql_num_rows() >= 1) { if ((row = sql_fetch_row()) == NULL) { Mmsg1(errmsg, _("error fetching row: %s\n"), sql_strerror()); } else {