diff options
author | Dan McGee <dan@archlinux.org> | 2011-10-21 22:24:03 +0200 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2011-10-24 17:57:51 +0200 |
commit | f5736ace651fd7c277a7729919b45504b830d728 (patch) | |
tree | 1b0fffe3871e6fc63a1a2daa5a255dc830c48c41 | |
parent | bd361242f919d4102637b8fb51591037e8b5bea5 (diff) | |
download | aur-f5736ace651fd7c277a7729919b45504b830d728.tar.gz aur-f5736ace651fd7c277a7729919b45504b830d728.tar.xz |
aurblup: remove ';' from queries
The semicolons are not necessary when performing queries via the MySQL
API, so remove them.
Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
-rw-r--r-- | scripts/aurblup/aurblup.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/aurblup/aurblup.c b/scripts/aurblup/aurblup.c index 6a67d68d..e01f0536 100644 --- a/scripts/aurblup/aurblup.c +++ b/scripts/aurblup/aurblup.c @@ -74,7 +74,7 @@ blacklist_get_pkglist() MYSQL_ROW row; alpm_list_t *pkglist = NULL; - if (mysql_query(c, "SELECT Name FROM PackageBlacklist;")) + if (mysql_query(c, "SELECT Name FROM PackageBlacklist")) mysql_die("failed to read blacklist from MySQL database: %s\n"); if (!(res = mysql_store_result(c))) @@ -96,7 +96,7 @@ blacklist_add(const char *name) mysql_real_escape_string(c, esc, name, strlen(name)); snprintf(query, 1024, "INSERT INTO PackageBlacklist (Name) " - "VALUES ('%s');", esc); + "VALUES ('%s')", esc); free(esc); if (mysql_query(c, query)) @@ -110,7 +110,7 @@ blacklist_remove(const char *name) char query[1024]; mysql_real_escape_string(c, esc, name, strlen(name)); - snprintf(query, 1024, "DELETE FROM PackageBlacklist WHERE Name = '%s';", esc); + snprintf(query, 1024, "DELETE FROM PackageBlacklist WHERE Name = '%s'", esc); free(esc); if (mysql_query(c, query)) @@ -125,7 +125,7 @@ blacklist_sync(alpm_list_t *pkgs_cur, alpm_list_t *pkgs_new) pkgs_add = alpm_list_diff(pkgs_new, pkgs_cur, (alpm_list_fn_cmp)strcmp); pkgs_rem = alpm_list_diff(pkgs_cur, pkgs_new, (alpm_list_fn_cmp)strcmp); - if (mysql_query(c, "START TRANSACTION;")) + if (mysql_query(c, "START TRANSACTION")) mysql_die("failed to start MySQL transaction: %s\n"); for (p = pkgs_add; p; p = alpm_list_next(p)) @@ -134,7 +134,7 @@ blacklist_sync(alpm_list_t *pkgs_cur, alpm_list_t *pkgs_new) for (p = pkgs_rem; p; p = alpm_list_next(p)) blacklist_remove(alpm_list_getdata(p)); - if (mysql_query(c, "COMMIT;")) + if (mysql_query(c, "COMMIT")) mysql_die("failed to commit MySQL transaction: %s\n"); alpm_list_free(pkgs_add); |