- if (NULL == (position = strchr(optarg, ':'))
- || position == optarg
- || 0 == strlen(position + 1)
- || 0 >= atoi(position + 1)
- || 0xffff < atoi(position + 1)) {
- print_usage(argv[0]);
- fprintf(stderr, "\ninvalid -p, format host:port\n");
+ if ((position = strchr(optarg, ':')) == NULL
+ || optarg == position
+ || strlen(position + 1) == 0
+ || atoi(position + 1) <= 0
+ || atoi(position + 1) > 0xffff) {
+ fprintf(stderr, "invalid -p: '%s', format host:port\n",
+ optarg);