Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147995731
D51540.1785040738.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
711 B
Referenced Files
None
Subscribers
None
D51540.1785040738.diff
View Options
diff --git a/usr.sbin/jls/jls.c b/usr.sbin/jls/jls.c
--- a/usr.sbin/jls/jls.c
+++ b/usr.sbin/jls/jls.c
@@ -140,8 +140,11 @@
ip4_ok = feature_present("inet");
#endif
+ argc -= optind;
+ argv += optind;
+
/* Add the parameters to print. */
- if (optind == argc) {
+ if (argc == 0) {
if (pflags & (PRINT_HEADER | PRINT_NAMEVAL))
add_param("all", NULL, (size_t)0, NULL, JP_USER);
else if (pflags & PRINT_VERBOSE) {
@@ -179,9 +182,8 @@
}
} else {
pflags &= ~PRINT_VERBOSE;
- while (optind < argc)
- add_param(argv[optind++], NULL, (size_t)0, NULL,
- JP_USER);
+ for (i = 0; i < argc; i++)
+ add_param(argv[i], NULL, (size_t)0, NULL, JP_USER);
}
if (pflags & PRINT_SKIP) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jul 26, 4:38 AM (15 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29265018
Default Alt Text
D51540.1785040738.diff (711 B)
Attached To
Mode
D51540: jls: minor simplification to arg handling
Attached
Detach File
Event Timeline
Log In to Comment