We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46274e7 commit 6b90acbCopy full SHA for 6b90acb
src/sudo.c
@@ -620,12 +620,13 @@ get_user_info(struct user_details *ud)
620
621
ttydev = get_process_ttyname(path, sizeof(path));
622
if (ttydev != (dev_t)-1) {
623
+ int len;
624
#if SIZEOF_DEV_T == SIZEOF_LONG
- n = asprintf(&info[++i], "ttydev=%lu", (unsigned long)ttydev);
625
+ len = asprintf(&info[++i], "ttydev=%lu", (unsigned long)ttydev);
626
#else
- n = asprintf(&info[++i], "ttydev=%llu", (unsigned long long)ttydev);
627
+ len = asprintf(&info[++i], "ttydev=%llu", (unsigned long long)ttydev);
628
#endif
- if (n == -1)
629
+ if (len == -1)
630
goto oom;
631
info[++i] = sudo_new_key_val("tty", path);
632
if (info[i] == NULL)
0 commit comments