Skip to content

Commit

Permalink
remove unused group dependency flags
Browse files Browse the repository at this point in the history
  • Loading branch information
donald committed Jun 2, 2017
1 parent e35abba commit 50c7767
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
3 changes: 0 additions & 3 deletions mxq_group.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ struct mxq_group {

#define MXQ_GROUP_FLAG_CLOSED (1<<0)

#define MXQ_GROUP_FLAG_HAS_DEPENDENCY (1<<1)
#define MXQ_GROUP_FLAG_IS_DEPENDENCY (1<<2)

void mxq_group_free_content(struct mxq_group *g);

uint64_t mxq_group_jobs_done(struct mxq_group *g);
Expand Down
4 changes: 0 additions & 4 deletions mxqadmin.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,18 +118,15 @@ static int update_group_flags_reopen(struct mx_mysql *mysql, uint64_t group_id,
struct mx_mysql_stmt *stmt = NULL;
unsigned long long num_rows = 0;
int res;
uint64_t flagsnottobeset;
uint64_t newflags = 0;

flagsnottobeset = MXQ_GROUP_FLAG_IS_DEPENDENCY;
newflags |= MXQ_GROUP_FLAG_CLOSED;

stmt = mx_mysql_statement_prepare(mysql,
"UPDATE mxq_group SET"
" group_flags = group_flags & ~(?)"
" WHERE group_id = ?"
" AND user_uid = ?"
" AND group_flags & ? = 0"
);
if (!stmt) {
mx_log_err("mx_mysql_statement_prepare(): %m");
Expand All @@ -139,7 +136,6 @@ static int update_group_flags_reopen(struct mx_mysql *mysql, uint64_t group_id,
res = mx_mysql_statement_param_bind(stmt, 0, uint64, &(newflags));
res += mx_mysql_statement_param_bind(stmt, 1, uint64, &(group_id));
res += mx_mysql_statement_param_bind(stmt, 2, uint32, &(user_uid));
res += mx_mysql_statement_param_bind(stmt, 3, uint64, &(flagsnottobeset));
assert(res == 0);

res = mx_mysql_statement_execute(stmt, &num_rows);
Expand Down

0 comments on commit 50c7767

Please sign in to comment.