[Midnightbsd-cvs] src [7436] trunk/lib/libmport/bundle_read_install_pkg.c: these are int types, handle them as such in the query

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sat Jan 23 15:26:02 EST 2016


Revision: 7436
          http://svnweb.midnightbsd.org/src/?rev=7436
Author:   laffer1
Date:     2016-01-23 15:26:02 -0500 (Sat, 23 Jan 2016)
Log Message:
-----------
these are int types, handle them as such in the query

Modified Paths:
--------------
    trunk/lib/libmport/bundle_read_install_pkg.c

Modified: trunk/lib/libmport/bundle_read_install_pkg.c
===================================================================
--- trunk/lib/libmport/bundle_read_install_pkg.c	2016-01-23 20:06:39 UTC (rev 7435)
+++ trunk/lib/libmport/bundle_read_install_pkg.c	2016-01-23 20:26:02 UTC (rev 7436)
@@ -94,7 +94,7 @@
         RETURN_CURRENT_ERROR;
 
     /* Process @preexec steps */
-    if (mport_db_prepare(db, &assets, "SELECT type, data FROM stub.assets WHERE pkg=%Q and type in (%Q, %Q)", pkg->name, ASSET_CWD, ASSET_PREEXEC) != MPORT_OK)
+    if (mport_db_prepare(db, &assets, "SELECT type, data FROM stub.assets WHERE pkg=%Q and type in (%d, %d)", pkg->name, ASSET_CWD, ASSET_PREEXEC) != MPORT_OK)
         goto ERROR;
 
     (void) strlcpy(cwd, pkg->prefix, sizeof(cwd));
@@ -435,7 +435,7 @@
     db = mport->db;
 
     /* Process @postexec steps */
-    if (mport_db_prepare(db, &assets, "SELECT type, data FROM stub.assets WHERE pkg=%Q and type in (%Q, %Q)", pkg->name, ASSET_CWD, ASSET_POSTEXEC) != MPORT_OK)
+    if (mport_db_prepare(db, &assets, "SELECT type, data FROM stub.assets WHERE pkg=%Q and type in (%d, %d)", pkg->name, ASSET_CWD, ASSET_POSTEXEC) != MPORT_OK)
         goto ERROR;
 
     (void) strlcpy(cwd, pkg->prefix, sizeof(cwd));



More information about the Midnightbsd-cvs mailing list