opkg: apply "1-pkg-parse--Optimize-inefficient-parsing.patch" from OpenEmbedded
[oweals/opkg-lede.git] / opkg_cmd.c
index 4e70eeb4ce61130337a9a749c52c672e83783feb..f32aa47d61a6721d87152dd0c4f58d5fc390858e 100644 (file)
@@ -153,12 +153,11 @@ int opkg_cmd_exec(opkg_cmd_t *cmd, opkg_conf_t *conf, int argc, const char **arg
       
 
        result = (cmd->fun)(conf, argc, argv);
-        if ( result == 0 ) {
-           opkg_message(conf, OPKG_NOTICE, "Successfully terminated.\n");
-        } else {
-           opkg_message(conf, OPKG_NOTICE, "An error ocurred, return value: %d.\n", result);
 
+        if ( result != 0 ) {
+           opkg_message(conf, OPKG_NOTICE, "An error ocurred, return value: %d.\n", result);
         }
+
         if ( error_list ) {
            reverse_error_list(&error_list);