Merge pull request #798 from axQuadratic/mmsg_oflag

mmsg: fix -o flag causing empty output when used with -g
This commit is contained in:
DreamMaoMao 2026-03-23 11:04:58 +08:00 committed by GitHub
commit d967153c73
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -569,12 +569,12 @@ int32_t main(int32_t argc, char *argv[]) {
mode = WATCH;
break;
case 'o':
if (mode == SET)
if (mode == GET || mode == WATCH)
oflag = 1;
else if (mode == SET)
output_name = EARGF(usage());
else
output_name = ARGF();
if (!output_name)
oflag = 1;
break;
case 't':
tflag = 1;