diff options
author | Roy Marples <roy@marples.name> | 2008-01-21 15:30:40 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2008-01-21 15:30:40 +0000 |
commit | 07728abbc1eb1aa91d21318f3a3d64b15c2800fe (patch) | |
tree | 350dfce5968e05b1db4a1b7d94cb72dfdf830df4 /src/rc/rc.c | |
parent | 847ccac13c8afc04d1105cc483c8ec7e9baa53a6 (diff) |
Checking first char for null is more efficient than strlen.
Diffstat (limited to 'src/rc/rc.c')
-rw-r--r-- | src/rc/rc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rc/rc.c b/src/rc/rc.c index e6884154..1ee7330a 100644 --- a/src/rc/rc.c +++ b/src/rc/rc.c @@ -634,7 +634,7 @@ int main (int argc, char **argv) { switch (opt) { case 'o': - if (strlen (optarg) == 0) + if (*optarg == '\0') optarg = NULL; exit (set_ksoftlevel (optarg) ? EXIT_SUCCESS : EXIT_FAILURE); case_RC_COMMON_GETOPT |