forked from bonsai/harakit
strcmp(1): returns -1, specifies sysexits imports
This commit is contained in:
parent
35a20dca79
commit
26b0c93f4d
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h> /* fprintf(3), stderr */
|
#include <stdio.h> /* fprintf(3), stderr */
|
||||||
#include <sysexits.h>
|
#include <sysexits.h> /* EX_OK, EX_USAGE */
|
||||||
|
|
||||||
static char *program_name = "strcmp";
|
static char *program_name = "strcmp";
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ int main(int argc, char *argv[]) {
|
|||||||
if (*argv[i-1] > *argv[i]) {
|
if (*argv[i-1] > *argv[i]) {
|
||||||
return 1;
|
return 1;
|
||||||
} else if (*argv[i-1] < *argv[i]++) {
|
} else if (*argv[i-1] < *argv[i]++) {
|
||||||
return 255;
|
return -1; /* actually 255 */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user