comparison sciworkerd/main.c @ 53:319979427566

misc: refactor using util_getopt
author David Demelier <markand@malikania.fr>
date Wed, 17 Aug 2022 09:52:00 +0200
parents 95bc6b4ec753
children 562372396019
comparison
equal deleted inserted replaced
52:95bc6b4ec753 53:319979427566
43 int ch, val; 43 int ch, val;
44 44
45 env(); 45 env();
46 opterr = 0; 46 opterr = 0;
47 47
48 while ((ch = getopt(argc, argv, "k:j:t:u:w:")) != -1) { 48 while ((ch = util_getopt(argc, argv, "k:j:t:u:w:")) != -1) {
49 switch (ch) { 49 switch (ch) {
50 case 'j': 50 case 'j':
51 if ((val = atoi(optarg)) > 0) 51 if ((val = atoi(optarg)) > 0)
52 sciworkerd.maxjobs = val; 52 sciworkerd.maxjobs = val;
53 break; 53 break;