Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
idnode api: little cleanup
  • Loading branch information
perexg committed Sep 25, 2014
1 parent 7fa70f9 commit bffd6fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
5 changes: 2 additions & 3 deletions src/api.h
Expand Up @@ -80,9 +80,8 @@ void api_dvr_init ( void );
*/
typedef struct api_idnode_grid_conf
{
int tindex;
int start;
int limit;
uint32_t start;
uint32_t limit;
idnode_filter_t filter;
idnode_sort_t sort;
} api_idnode_grid_conf_t;
Expand Down
13 changes: 2 additions & 11 deletions src/api/api_idnode.c
Expand Up @@ -61,17 +61,8 @@ api_idnode_grid_conf
htsmsg_t *filter, *e;
const char *str;

/* Start */
if ((str = htsmsg_get_str(args, "start")))
conf->start = atoi(str);
else
conf->start = 0;

/* Limit */
if ((str = htsmsg_get_str(args, "limit")))
conf->limit = atoi(str);
else
conf->limit = 50;
conf->start = htsmsg_get_u32_or_default(args, "start", 0);
conf->limit = htsmsg_get_u32_or_default(args, "limit", 50);

/* Filter */
if ((filter = htsmsg_get_list(args, "filter"))) {
Expand Down

0 comments on commit bffd6fb

Please sign in to comment.