The compiler almost certainly knows better.
[oweals/opkg-lede.git] / libopkg / libopkg.c
index d4910deca1337a28658675ac3cb3a12b86981d9f..418a32485624c7f88de27bb6a1dedf241cf6e47b 100644 (file)
@@ -38,7 +38,7 @@ int default_opkg_message_callback(opkg_conf_t *conf, message_level_t level,
           if ( level == OPKG_ERROR ){
              push_error_list(&error_list, msg); 
           } else
-            printf(msg);
+           printf("%s",msg);
      }
      return 0;
 }
@@ -71,7 +71,7 @@ int default_opkg_status_callback(char *name, int istatus, char *desc,
 char* default_opkg_response_callback(char *question)
 {
      char *response = NULL;
-     printf(question);
+     printf("%s",question);
      fflush(stdout);
      do {
          response = (char *)file_read_line_alloc(stdin);
@@ -128,14 +128,13 @@ opkg_op (int argc, char *argv[])
 
 
        err = opkg_conf_init (&opkg_conf, &args);
+       args_deinit (&args);
        if (err)
        {
                opkg_print_error_list (&opkg_conf);
                return err;
        }
 
-       args_deinit (&args);
-
        if ( strcmp(cmd_name, "files")==0)
             opkg_cb_list = default_opkg_files_callback;
        else