From 137c360a2eccd02b4601d654abb5e5c1694b7a87 Mon Sep 17 00:00:00 2001 From: Rose <83477269+AtariDreams@users.noreply.github.com> Date: Thu, 17 Nov 2022 10:12:26 -0500 Subject: [PATCH] Change (argc < 6 || argc > 7) to (argc != 6 && argc != 7) They both do the same thing, but the latter is more clear. --- backend/lpd.c | 2 +- backend/socket.c | 2 +- backend/usb.c | 2 +- filter/commandtops.c | 2 +- filter/gziptoany.c | 2 +- filter/pstops.c | 2 +- filter/rastertoepson.c | 2 +- filter/rastertohp.c | 2 +- filter/rastertolabel.c | 2 +- filter/rastertopwg.c | 2 +- monitor/bcp.c | 2 +- monitor/tbcp.c | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/backend/lpd.c b/backend/lpd.c index af68c958db..26e84171bd 100644 --- a/backend/lpd.c +++ b/backend/lpd.c @@ -165,7 +165,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */ _cupsLangString(cupsLangDefault(), _("LPD/LPR Host or Printer"))); return (CUPS_BACKEND_OK); } - else if (argc < 6 || argc > 7) + else if (argc != 6 && argc != 7) { _cupsLangPrintf(stderr, _("Usage: %s job-id user title copies options [file]"), diff --git a/backend/socket.c b/backend/socket.c index 68379e95b7..05ee1925c0 100644 --- a/backend/socket.c +++ b/backend/socket.c @@ -113,7 +113,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */ _cupsLangString(cupsLangDefault(), _("AppSocket/HP JetDirect"))); return (CUPS_BACKEND_OK); } - else if (argc < 6 || argc > 7) + else if (argc != 6 && argc != 7) { _cupsLangPrintf(stderr, _("Usage: %s job-id user title copies options [file]"), diff --git a/backend/usb.c b/backend/usb.c index e1b2c03dc9..a78bb3ee51 100644 --- a/backend/usb.c +++ b/backend/usb.c @@ -164,7 +164,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */ list_devices(); return (CUPS_BACKEND_OK); } - else if (argc < 6 || argc > 7) + else if (argc != 6 && argc != 7) { _cupsLangPrintf(stderr, _("Usage: %s job-id user title copies options [file]"), diff --git a/filter/commandtops.c b/filter/commandtops.c index 3edcc6a0c3..829fc95561 100644 --- a/filter/commandtops.c +++ b/filter/commandtops.c @@ -46,7 +46,7 @@ main(int argc, /* I - Number of command-line arguments */ * Check for valid arguments... */ - if (argc < 6 || argc > 7) + if (argc != 6 && argc != 7) { /* * We don't have the correct number of arguments; write an error message diff --git a/filter/gziptoany.c b/filter/gziptoany.c index c2c8bc00d3..78b7ebbd2d 100644 --- a/filter/gziptoany.c +++ b/filter/gziptoany.c @@ -34,7 +34,7 @@ main(int argc, /* I - Number of command-line arguments */ * Check command-line... */ - if (argc < 6 || argc > 7) + if (argc != 6 && argc != 7) { _cupsLangPrintf(stderr, _("Usage: %s job-id user title copies options [file]"), diff --git a/filter/pstops.c b/filter/pstops.c index d251abb0e7..5b7aeb5cd7 100644 --- a/filter/pstops.c +++ b/filter/pstops.c @@ -217,7 +217,7 @@ main(int argc, /* I - Number of command-line args */ * Check command-line... */ - if (argc < 6 || argc > 7) + if (argc != 6 && argc != 7) { _cupsLangPrintf(stderr, _("Usage: %s job-id user title copies options [file]"), diff --git a/filter/rastertoepson.c b/filter/rastertoepson.c index be3bd5e0e1..c815691dc7 100644 --- a/filter/rastertoepson.c +++ b/filter/rastertoepson.c @@ -988,7 +988,7 @@ main(int argc, /* I - Number of command-line arguments */ * Check command-line... */ - if (argc < 6 || argc > 7) + if (argc != 6 && argc != 7) { /* * We don't have the correct number of arguments; write an error message diff --git a/filter/rastertohp.c b/filter/rastertohp.c index 31ee0c4c98..dd042167f8 100644 --- a/filter/rastertohp.c +++ b/filter/rastertohp.c @@ -657,7 +657,7 @@ main(int argc, /* I - Number of command-line arguments */ * Check command-line... */ - if (argc < 6 || argc > 7) + if (argc != 6 && argc != 7) { /* * We don't have the correct number of arguments; write an error message diff --git a/filter/rastertolabel.c b/filter/rastertolabel.c index 73ac4d76eb..a8c1b0b1b0 100644 --- a/filter/rastertolabel.c +++ b/filter/rastertolabel.c @@ -1110,7 +1110,7 @@ main(int argc, /* I - Number of command-line arguments */ * Check command-line... */ - if (argc < 6 || argc > 7) + if (argc != 6 && argc != 7) { /* * We don't have the correct number of arguments; write an error message diff --git a/filter/rastertopwg.c b/filter/rastertopwg.c index d56cecda15..6e0ccf2312 100644 --- a/filter/rastertopwg.c +++ b/filter/rastertopwg.c @@ -56,7 +56,7 @@ main(int argc, /* I - Number of command-line args */ const char *val; /* Option value */ - if (argc < 6 || argc > 7) + if (argc != 6 && argc != 7) { puts("Usage: rastertopwg job user title copies options [filename]"); return (1); diff --git a/monitor/bcp.c b/monitor/bcp.c index 42c095ad12..26d4a45c7a 100644 --- a/monitor/bcp.c +++ b/monitor/bcp.c @@ -42,7 +42,7 @@ main(int argc, /* I - Number of command-line args */ * Check command-line... */ - if (argc < 6 || argc > 7) + if (argc != 6 && argc != 7) { _cupsLangPrintf(stderr, _("Usage: %s job-id user title copies options [file]"), diff --git a/monitor/tbcp.c b/monitor/tbcp.c index 20c5dcfb9c..c36a812cda 100644 --- a/monitor/tbcp.c +++ b/monitor/tbcp.c @@ -41,7 +41,7 @@ main(int argc, /* I - Number of command-line args */ * Check command-line... */ - if (argc < 6 || argc > 7) + if (argc != 6 && argc != 7) { _cupsLangPrintf(stderr, _("Usage: %s job-id user title copies options [file]"), -- 2.47.2