summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2019-12-12 07:15:25 -0500
committerSolomon Peachy <pizza@shaftnet.org>2019-12-12 07:15:25 -0500
commit53904729c5731b8fd2d0466b9d3b5a646680ee23 (patch)
tree68d9ae00b92d6d782edb35967a9e0fcf3aeb03c8
parent0a70fd1612858db7844992218f2b0559bdb334be (diff)
downloadselphy_print-53904729c5731b8fd2d0466b9d3b5a646680ee23.tar.gz
selphy_print-53904729c5731b8fd2d0466b9d3b5a646680ee23.tar.bz2
selphy_print-53904729c5731b8fd2d0466b9d3b5a646680ee23.zip
misc: use CUPS_BACKEND_OK instead of 0 as a return value.
-rw-r--r--backend_canonselphy.c18
-rw-r--r--backend_canonselphyneo.c2
-rw-r--r--backend_common.c6
-rw-r--r--backend_dnpds40.c18
-rw-r--r--backend_hiti.c2
-rw-r--r--backend_kodak1400.c4
-rw-r--r--backend_kodak6800.c12
-rw-r--r--backend_magicard.c6
-rw-r--r--backend_mitsu70x.c18
-rw-r--r--backend_mitsu9550.c6
-rw-r--r--backend_mitsud90.c4
-rw-r--r--backend_mitsup95d.c2
-rw-r--r--backend_shinkos1245.c16
-rw-r--r--backend_sinfonia.c2
-rw-r--r--backend_sonyupd.c2
15 files changed, 59 insertions, 59 deletions
diff --git a/backend_canonselphy.c b/backend_canonselphy.c
index 82c0566..c60fa94 100644
--- a/backend_canonselphy.c
+++ b/backend_canonselphy.c
@@ -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)
diff --git a/backend_canonselphyneo.c b/backend_canonselphyneo.c
index 44d2cf7..a718835 100644
--- a/backend_canonselphyneo.c
+++ b/backend_canonselphyneo.c
@@ -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)
diff --git a/backend_common.c b/backend_common.c
index 1129490..4808b52 100644
--- a/backend_common.c
+++ b/backend_common.c
@@ -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)
diff --git a/backend_dnpds40.c b/backend_dnpds40.c
index e413579..220bc27 100644
--- a/backend_dnpds40.c
+++ b/backend_dnpds40.c
@@ -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)
diff --git a/backend_hiti.c b/backend_hiti.c
index 3416260..3a8b67e 100644
--- a/backend_hiti.c
+++ b/backend_hiti.c
@@ -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)
diff --git a/backend_kodak1400.c b/backend_kodak1400.c
index 80e4ae8..a6ff755 100644
--- a/backend_kodak1400.c
+++ b/backend_kodak1400.c
@@ -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)
diff --git a/backend_kodak6800.c b/backend_kodak6800.c
index 8a34a0e..a9d524e 100644
--- a/backend_kodak6800.c
+++ b/backend_kodak6800.c
@@ -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)
diff --git a/backend_magicard.c b/backend_magicard.c
index 7c504c4..f5ab1a4 100644
--- a/backend_magicard.c
+++ b/backend_magicard.c
@@ -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)
diff --git a/backend_mitsu70x.c b/backend_mitsu70x.c
index cf7121f..31d0c56 100644
--- a/backend_mitsu70x.c
+++ b/backend_mitsu70x.c
@@ -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)
diff --git a/backend_mitsu9550.c b/backend_mitsu9550.c
index 4586a69..2145bfc 100644
--- a/backend_mitsu9550.c
+++ b/backend_mitsu9550.c
@@ -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)
diff --git a/backend_mitsud90.c b/backend_mitsud90.c
index e15a389..3a70b13 100644
--- a/backend_mitsud90.c
+++ b/backend_mitsud90.c
@@ -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)
diff --git a/backend_mitsup95d.c b/backend_mitsup95d.c
index 1109ef0..785a4d8 100644
--- a/backend_mitsup95d.c
+++ b/backend_mitsup95d.c
@@ -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)
diff --git a/backend_shinkos1245.c b/backend_shinkos1245.c
index 722ebf5..6a30c3d 100644
--- a/backend_shinkos1245.c
+++ b/backend_shinkos1245.c
@@ -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)
diff --git a/backend_sinfonia.c b/backend_sinfonia.c
index 093f4ec..eb50981 100644
--- a/backend_sinfonia.c
+++ b/backend_sinfonia.c
@@ -1160,7 +1160,7 @@ int kodak6_mediamax(int type)
case KODAK7_MEDIA_6R:
return 570;
default:
- return 0;
+ return CUPS_BACKEND_OK;
}
}
diff --git a/backend_sonyupd.c b/backend_sonyupd.c
index f6d5d77..ed31376 100644
--- a/backend_sonyupd.c
+++ b/backend_sonyupd.c
@@ -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)