misc: use CUPS_BACKEND_OK instead of 0 as a return value.
This commit is contained in:
parent
13d62550f3
commit
1d331f940d
|
@ -126,7 +126,7 @@ static uint8_t es1_error_detect(uint8_t *rdbuf)
|
|||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static uint8_t es2_error_detect(uint8_t *rdbuf)
|
||||
|
@ -150,7 +150,7 @@ static uint8_t es2_error_detect(uint8_t *rdbuf)
|
|||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static uint8_t es3_error_detect(uint8_t *rdbuf)
|
||||
|
@ -184,14 +184,14 @@ static uint8_t es3_error_detect(uint8_t *rdbuf)
|
|||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static uint8_t es40_error_detect(uint8_t *rdbuf)
|
||||
{
|
||||
/* ES40 */
|
||||
if (!rdbuf[3])
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
|
||||
if (rdbuf[3] == 0x01)
|
||||
ERROR("Generic communication error\n");
|
||||
|
@ -226,7 +226,7 @@ static uint8_t cp790_error_detect(uint8_t *rdbuf)
|
|||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static char *cp10_pgcode_names(uint8_t *rdbuf, struct printer_data *printer, int *numtype)
|
||||
|
@ -241,7 +241,7 @@ static char *cp10_pgcode_names(uint8_t *rdbuf, struct printer_data *printer, int
|
|||
static uint8_t cp10_error_detect(uint8_t *rdbuf)
|
||||
{
|
||||
if (!rdbuf[2])
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
|
||||
if (rdbuf[2] == 0x80)
|
||||
ERROR("No ribbon loaded\n");
|
||||
|
@ -257,7 +257,7 @@ static uint8_t cp10_error_detect(uint8_t *rdbuf)
|
|||
static uint8_t cpxxx_error_detect(uint8_t *rdbuf)
|
||||
{
|
||||
if (!rdbuf[2])
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
|
||||
if (rdbuf[2] == 0x01)
|
||||
ERROR("Paper feed problem!\n");
|
||||
|
@ -472,7 +472,7 @@ static int fancy_memcmp(const uint8_t *buf_a, const int16_t *buf_b, uint len)
|
|||
else if (buf_a[i] < buf_b[i])
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static int parse_printjob(uint8_t *buffer, uint8_t *bw_mode, uint32_t *plane_len)
|
||||
|
@ -1085,7 +1085,7 @@ static int canonselphy_cmdline_arg(void *vctx, int argc, char **argv)
|
|||
if (j) return j;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static void canonselphy_cmdline(void)
|
||||
|
|
|
@ -474,7 +474,7 @@ static int selphyneo_cmdline_arg(void *vctx, int argc, char **argv)
|
|||
if (j) return j;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static void selphyneo_cmdline(void)
|
||||
|
|
|
@ -165,7 +165,7 @@ int parse1284_data(const char *device_id, struct deviceid_dict* dict)
|
|||
int num = 0;
|
||||
|
||||
if (!device_id)
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
|
||||
//[whitespace]key[whitespace]:[whitespace]value[whitespace];
|
||||
while (*device_id && num < MAX_DICT) {
|
||||
|
@ -302,7 +302,7 @@ int send_data(struct libusb_device_handle *dev, uint8_t endp,
|
|||
buf += num;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
/* More stuff */
|
||||
|
@ -1597,7 +1597,7 @@ int dyesub_joblist_addjob(struct dyesub_joblist *list, const void *job)
|
|||
|
||||
list->entries[list->num_entries++] = job;
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
int dyesub_joblist_print(const struct dyesub_joblist *list)
|
||||
|
|
|
@ -2706,7 +2706,7 @@ static int dnpds40_get_status(struct dnpds40_ctx *ctx)
|
|||
}
|
||||
INFO("Half-Size Prints Remaining on Media: %d\n", count);
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static int dnpds40_get_counters(struct dnpds40_ctx *ctx)
|
||||
|
@ -2846,7 +2846,7 @@ static int dnpds40_clear_counter(struct dnpds40_ctx *ctx, char counter)
|
|||
if ((ret = dnpds40_do_cmd(ctx, &cmd, (uint8_t*)msg, 4)))
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static int dnpds40_cancel_job(struct dnpds40_ctx *ctx)
|
||||
|
@ -2860,7 +2860,7 @@ static int dnpds40_cancel_job(struct dnpds40_ctx *ctx)
|
|||
if ((ret = dnpds40_do_cmd(ctx, &cmd, NULL, 0)))
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static int dnpds40_reset_printer(struct dnpds40_ctx *ctx)
|
||||
|
@ -2874,7 +2874,7 @@ static int dnpds40_reset_printer(struct dnpds40_ctx *ctx)
|
|||
if ((ret = dnpds40_do_cmd(ctx, &cmd, NULL, 0)))
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static int dnpds620_standby_mode(struct dnpds40_ctx *ctx, int delay)
|
||||
|
@ -2890,7 +2890,7 @@ static int dnpds620_standby_mode(struct dnpds40_ctx *ctx, int delay)
|
|||
if ((ret = dnpds40_do_cmd(ctx, &cmd, (uint8_t*)msg, 8)))
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static int dnpds620_media_keep_mode(struct dnpds40_ctx *ctx, int delay)
|
||||
|
@ -2906,7 +2906,7 @@ static int dnpds620_media_keep_mode(struct dnpds40_ctx *ctx, int delay)
|
|||
if ((ret = dnpds40_do_cmd(ctx, &cmd, (uint8_t*)msg, 4)))
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static int dnpds620_iserial_mode(struct dnpds40_ctx *ctx, int enable)
|
||||
|
@ -2922,7 +2922,7 @@ static int dnpds620_iserial_mode(struct dnpds40_ctx *ctx, int enable)
|
|||
if ((ret = dnpds40_do_cmd(ctx, &cmd, (uint8_t*)msg, 8)))
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static int dnpds40_set_counter_p(struct dnpds40_ctx *ctx, char *arg)
|
||||
|
@ -2939,7 +2939,7 @@ static int dnpds40_set_counter_p(struct dnpds40_ctx *ctx, char *arg)
|
|||
if ((ret = dnpds40_do_cmd(ctx, &cmd, (uint8_t*)msg, 8)))
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static void dnpds40_cmdline(void)
|
||||
|
@ -3059,7 +3059,7 @@ static int dnpds40_cmdline_arg(void *vctx, int argc, char **argv)
|
|||
if (j) return j;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static int dnpds40_query_markers(void *vctx, struct marker **markers, int *count)
|
||||
|
|
|
@ -1793,7 +1793,7 @@ static int hiti_cmdline_arg(void *vctx, int argc, char **argv)
|
|||
if (j) return j;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static void hiti_cmdline(void)
|
||||
|
|
|
@ -142,7 +142,7 @@ static int send_plane(struct kodak1400_ctx *ctx,
|
|||
cmdbuf, CMDBUF_LEN)))
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
#define TONE_CURVE_SIZE 1552
|
||||
|
@ -270,7 +270,7 @@ int kodak1400_cmdline_arg(void *vctx, int argc, char **argv)
|
|||
if (j) return j;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static void *kodak1400_init(void)
|
||||
|
|
|
@ -131,7 +131,7 @@ static int kodak6800_do_cmd(struct kodak6800_ctx *ctx,
|
|||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static void kodak68x0_dump_mediainfo(struct sinfonia_mediainfo_item *sizes,
|
||||
|
@ -238,7 +238,7 @@ static int kodak68x0_canceljob(struct kodak6800_ctx *ctx,
|
|||
return -99;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static int kodak68x0_reset(struct kodak6800_ctx *ctx)
|
||||
|
@ -261,7 +261,7 @@ static int kodak68x0_reset(struct kodak6800_ctx *ctx)
|
|||
return -99;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static void kodak68x0_dump_status(struct kodak6800_ctx *ctx, struct kodak68x0_status_readback *status)
|
||||
|
@ -356,7 +356,7 @@ static int kodak6800_get_status(struct kodak6800_ctx *ctx,
|
|||
/* Byteswap important stuff */
|
||||
status->status2 = be32_to_cpu(status->status2);
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static int kodak6800_get_tonecurve(struct kodak6800_ctx *ctx, uint8_t curve, char *fname)
|
||||
|
@ -575,7 +575,7 @@ static int kodak6800_query_serno(struct libusb_device_handle *dev, uint8_t endp_
|
|||
strncpy(buf, (char*)resp+24, buf_len);
|
||||
buf[buf_len-1] = 0;
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static int kodak6850_send_unk(struct kodak6800_ctx *ctx)
|
||||
|
@ -664,7 +664,7 @@ static int kodak6800_cmdline_arg(void *vctx, int argc, char **argv)
|
|||
if (j) return j;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static void *kodak6800_init(void)
|
||||
|
|
|
@ -275,7 +275,7 @@ static int magicard_query_sensors(struct magicard_ctx *ctx)
|
|||
buf[num] = 0;
|
||||
INFO("%s\n", buf);
|
||||
}
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static int magicard_selftest_card(struct magicard_ctx *ctx)
|
||||
|
@ -345,7 +345,7 @@ static int magicard_query_printer(struct magicard_ctx *ctx)
|
|||
buf[num] = 0;
|
||||
INFO("%s\n", buf);
|
||||
}
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static int magicard_query_status(struct magicard_ctx *ctx)
|
||||
|
@ -916,7 +916,7 @@ static int magicard_cmdline_arg(void *vctx, int argc, char **argv)
|
|||
if (j) return j;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static int magicard_query_markers(void *vctx, struct marker **markers, int *count)
|
||||
|
|
|
@ -1430,7 +1430,7 @@ static int mitsu70x_get_jobstatus(struct mitsu70x_ctx *ctx, struct mitsu70x_jobs
|
|||
return 4;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
@ -1464,7 +1464,7 @@ static int mitsu70x_get_jobs(struct mitsu70x_ctx *ctx, struct mitsu70x_jobs *res
|
|||
return 4;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1522,7 +1522,7 @@ static int mitsu70x_get_memorystatus(struct mitsu70x_ctx *ctx, const struct mits
|
|||
return CUPS_BACKEND_FAILED;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static int mitsu70x_get_printerstatus(struct mitsu70x_ctx *ctx, struct mitsu70x_printerstatus_resp *resp)
|
||||
|
@ -1551,7 +1551,7 @@ static int mitsu70x_get_printerstatus(struct mitsu70x_ctx *ctx, struct mitsu70x_
|
|||
return 4;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static int mitsu70x_cancel_job(struct mitsu70x_ctx *ctx, uint16_t jobid)
|
||||
|
@ -1569,7 +1569,7 @@ static int mitsu70x_cancel_job(struct mitsu70x_ctx *ctx, uint16_t jobid)
|
|||
cmdbuf, 4)))
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static int mitsu70x_set_sleeptime(struct mitsu70x_ctx *ctx, uint8_t time)
|
||||
|
@ -1592,7 +1592,7 @@ static int mitsu70x_set_sleeptime(struct mitsu70x_ctx *ctx, uint8_t time)
|
|||
cmdbuf, 4)))
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static int mitsu70x_set_iserial(struct mitsu70x_ctx *ctx, uint8_t enabled)
|
||||
|
@ -1616,7 +1616,7 @@ static int mitsu70x_set_iserial(struct mitsu70x_ctx *ctx, uint8_t enabled)
|
|||
cmdbuf, 4)))
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
@ -1645,7 +1645,7 @@ static int mitsu70x_set_printermode(struct mitsu70x_ctx *ctx, uint8_t enabled)
|
|||
cmdbuf, 4)))
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -2436,7 +2436,7 @@ static int mitsu70x_cmdline_arg(void *vctx, int argc, char **argv)
|
|||
if (j) return j;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static int mitsu70x_query_markers(void *vctx, struct marker **markers, int *count)
|
||||
|
|
|
@ -898,7 +898,7 @@ static int mitsu9550_get_status(struct mitsu9550_ctx *ctx, uint8_t *resp, int st
|
|||
return 4;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static char *mitsu9550_media_types(uint8_t type, uint8_t is_s)
|
||||
|
@ -1128,7 +1128,7 @@ static int validate_media(int type, int media, int cols, int rows)
|
|||
WARNING("Unknown printer type %d\n", type);
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static int mitsu9550_main_loop(void *vctx, const void *vjob) {
|
||||
|
@ -1667,7 +1667,7 @@ static int mitsu9550_cmdline_arg(void *vctx, int argc, char **argv)
|
|||
if (j) return j;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static int mitsu9550_query_markers(void *vctx, struct marker **markers, int *count)
|
||||
|
|
|
@ -1130,7 +1130,7 @@ static int mitsud90_set_sleeptime(struct mitsud90_ctx *ctx, uint16_t time)
|
|||
|
||||
/* No response */
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static void mitsud90_cmdline(void)
|
||||
|
@ -1183,7 +1183,7 @@ static int mitsud90_cmdline_arg(void *vctx, int argc, char **argv)
|
|||
if (j) return j;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static int mitsud90_query_markers(void *vctx, struct marker **markers, int *count)
|
||||
|
|
|
@ -546,7 +546,7 @@ static int mitsup95d_cmdline_arg(void *vctx, int argc, char **argv)
|
|||
if (j) return j;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static int mitsup95d_query_markers(void *vctx, struct marker **markers, int *count)
|
||||
|
|
|
@ -309,7 +309,7 @@ static int shinkos1245_get_status(struct shinkos1245_ctx *ctx,
|
|||
/* Byteswap important stuff */
|
||||
resp->state.status2 = be32_to_cpu(resp->state.status2);
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static int shinkos1245_get_media(struct shinkos1245_ctx *ctx)
|
||||
|
@ -374,7 +374,7 @@ static int shinkos1245_get_printerid(struct shinkos1245_ctx *ctx,
|
|||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static int shinkos1245_set_printerid(struct shinkos1245_ctx *ctx,
|
||||
|
@ -406,7 +406,7 @@ static int shinkos1245_set_printerid(struct shinkos1245_ctx *ctx,
|
|||
ERROR("Bad return code on SET_PRINTERID command\n");
|
||||
return -99;
|
||||
}
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static int shinkos1245_canceljob(struct shinkos1245_ctx *ctx,
|
||||
|
@ -431,7 +431,7 @@ static int shinkos1245_canceljob(struct shinkos1245_ctx *ctx,
|
|||
ERROR("Bad return code on CANCELJOB command\n");
|
||||
return -99;
|
||||
}
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static int shinkos1245_reset(struct shinkos1245_ctx *ctx)
|
||||
|
@ -454,7 +454,7 @@ static int shinkos1245_reset(struct shinkos1245_ctx *ctx)
|
|||
ERROR("Bad return code on RESET command\n");
|
||||
return -99;
|
||||
}
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
|
||||
|
@ -478,7 +478,7 @@ static int shinkos1245_set_matte(struct shinkos1245_ctx *ctx,
|
|||
return ret;
|
||||
}
|
||||
if (sts.code == CMD_CODE_OK)
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
if (sts.code == CMD_CODE_BAD)
|
||||
return 1;
|
||||
|
||||
|
@ -510,7 +510,7 @@ static int shinkos1245_get_matte(struct shinkos1245_ctx *ctx,
|
|||
}
|
||||
*intensity = sts.level;
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static char* shinkos1245_tonecurves(int type, int table)
|
||||
|
@ -923,7 +923,7 @@ int shinkos1245_cmdline_arg(void *vctx, int argc, char **argv)
|
|||
if (j) return j;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static void *shinkos1245_init(void)
|
||||
|
|
|
@ -1160,7 +1160,7 @@ int kodak6_mediamax(int type)
|
|||
case KODAK7_MEDIA_6R:
|
||||
return 570;
|
||||
default:
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -566,7 +566,7 @@ static int upd_cmdline_arg(void *vctx, int argc, char **argv)
|
|||
if (j) return j;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return CUPS_BACKEND_OK;
|
||||
}
|
||||
|
||||
static int upd_query_markers(void *vctx, struct marker **markers, int *count)
|
||||
|
|
Loading…
Reference in New Issue