Skip to content
Snippets Groups Projects
Commit 675bad8d authored by Jan Hák's avatar Jan Hák
Browse files

knsupdate: autocomplete - fix wrong pointer iteration

parent e19e3b7d
No related merge requests found
Pipeline #94552 passed with stages
in 5 minutes and 15 seconds
......@@ -22,7 +22,6 @@
#include "utils/knsupdate/knsupdate_exec.h"
#include "utils/knsupdate/knsupdate_interactive.h"
#define PROGRAM_NAME "knsupdate"
#define HISTORY_FILE ".knsupdate_history"
static char *prompt(EditLine *el)
......@@ -90,7 +89,7 @@ static unsigned char complete(EditLine *el, int ch)
// Find the command descriptor.
const char **desc = knsupdate_cmd_array;
while (*desc != NULL && strcmp((*desc) + 1, argv[0]) != 0) {
(*desc)++;
desc++;
}
if (*desc == NULL) {
goto complete_exit;
......
......@@ -30,8 +30,6 @@
#include "contrib/strtonum.h"
#include "contrib/ucw/mempool.h"
#define PROGRAM_NAME "knsupdate"
#define DEFAULT_RETRIES_NSUPDATE 3
#define DEFAULT_TIMEOUT_NSUPDATE 12
......
......@@ -25,6 +25,8 @@
#include "libzscanner/scanner.h"
#include "contrib/ucw/lists.h"
#define PROGRAM_NAME "knsupdate"
/*! \brief knsupdate-specific params data. */
typedef struct {
/*!< Stop processing - just print help, version,... */
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment