summaryrefslogtreecommitdiff
path: root/camlibs/canon/crc.c
diff options
context:
space:
mode:
Diffstat (limited to 'camlibs/canon/crc.c')
-rw-r--r--camlibs/canon/crc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/camlibs/canon/crc.c b/camlibs/canon/crc.c
index 5f44db07f..17b8990da 100644
--- a/camlibs/canon/crc.c
+++ b/camlibs/canon/crc.c
@@ -223,7 +223,7 @@ find_init (int len)
* program with a message to stderr.
*
*/
-unsigned short
+int
canon_psa50_gen_crc (const unsigned char *pkt, int len)
{
int init;
@@ -232,7 +232,7 @@ canon_psa50_gen_crc (const unsigned char *pkt, int len)
if (init != -1)
return chksum (init, len, pkt);
fprintf (stderr, _("FATAL ERROR: initial CRC value for length %d unknown\n"), len);
- exit (1);
+ return -1;
}
@@ -245,7 +245,7 @@ guess (const unsigned char *m, int len, int crc)
if (chksum (i, len, m) == crc)
return i;
fprintf (stderr, _("unable to guess initial CRC value\n"));
- exit (1);
+ return -1;
}
/**