OpenCoverage

who.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/coreutils/src/src/who.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4static -
5 _Bool -
6 do_lookup;-
7-
8-
9-
10-
11static -
12 _Bool -
13 short_list;-
14-
15-
16static -
17 _Bool -
18 short_output;-
19-
20-
21-
22-
23static -
24 _Bool -
25 include_idle;-
26-
27-
28static -
29 _Bool -
30 include_heading;-
31-
32-
33-
34static -
35 _Bool -
36 include_mesg;-
37-
38-
39static -
40 _Bool -
41 include_exit;-
42-
43-
44static -
45 _Bool -
46 need_boottime;-
47-
48-
49static -
50 _Bool -
51 need_deadprocs;-
52-
53-
54static -
55 _Bool -
56 need_login;-
57-
58-
59static -
60 _Bool -
61 need_initspawn;-
62-
63-
64static -
65 _Bool -
66 need_clockchange;-
67-
68-
69static -
70 _Bool -
71 need_runlevel;-
72-
73-
74static -
75 _Bool -
76 need_users;-
77-
78-
79static -
80 _Bool -
81 my_line_only;-
82-
83-
84-
85static char const *time_format;-
86static int time_format_width;-
87-
88-
89enum-
90{-
91 LOOKUP_OPTION = 0x7f + 1-
92};-
93-
94static struct option const longopts[] =-
95{-
96 {"all", -
97 0-
98 , -
99 ((void *)0)-
100 , 'a'},-
101 {"boot", -
102 0-
103 , -
104 ((void *)0)-
105 , 'b'},-
106 {"count", -
107 0-
108 , -
109 ((void *)0)-
110 , 'q'},-
111 {"dead", -
112 0-
113 , -
114 ((void *)0)-
115 , 'd'},-
116 {"heading", -
117 0-
118 , -
119 ((void *)0)-
120 , 'H'},-
121 {"login", -
122 0-
123 , -
124 ((void *)0)-
125 , 'l'},-
126 {"lookup", -
127 0-
128 , -
129 ((void *)0)-
130 , LOOKUP_OPTION},-
131 {"message", -
132 0-
133 , -
134 ((void *)0)-
135 , 'T'},-
136 {"mesg", -
137 0-
138 , -
139 ((void *)0)-
140 , 'T'},-
141 {"process", -
142 0-
143 , -
144 ((void *)0)-
145 , 'p'},-
146 {"runlevel", -
147 0-
148 , -
149 ((void *)0)-
150 , 'r'},-
151 {"short", -
152 0-
153 , -
154 ((void *)0)-
155 , 's'},-
156 {"time", -
157 0-
158 , -
159 ((void *)0)-
160 , 't'},-
161 {"users", -
162 0-
163 , -
164 ((void *)0)-
165 , 'u'},-
166 {"writable", -
167 0-
168 , -
169 ((void *)0)-
170 , 'T'},-
171 {"help", -
172 0-
173 , -
174 ((void *)0)-
175 , GETOPT_HELP_CHAR},-
176 {"version", -
177 0-
178 , -
179 ((void *)0)-
180 , GETOPT_VERSION_CHAR},-
181 {-
182 ((void *)0)-
183 , 0, -
184 ((void *)0)-
185 , 0}-
186};-
187-
188-
189-
190-
191static const char *-
192idle_string (time_t when, time_t boottime)-
193{-
194 static time_t now = ((time_t) ~ ((time_t) (! (! ((time_t) 0 < (time_t) -1)) ? (time_t) -1 : ((((time_t) 1 << ((sizeof (time_t) * 8) - 2)) - 1) * 2 + 1))));-
195-
196 if (now == ((time_t) ~ ((time_t) (! (! ((time_t) 0 < (time_t) -1)) ? (time_t) -1 : ((((time_t) 1 << ((sizeof (time_t) * 8) - 2)) - 1) * 2 + 1))))
now == ((time_...1) * 2 + 1))))Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • who
FALSEnever evaluated
)
0-1
197 time (&now);
executed 1 time by 1 test: time (&now);
Executed by:
  • who
1
198-
199 if (boottime < when
boottime < whenDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • who
FALSEnever evaluated
&& now - 24 * 60 * 60 < when
now - 24 * 60 * 60 < whenDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • who
&& when <= now
when <= nowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0-1
200 {-
201 int seconds_idle = now - when;-
202 if (seconds_idle < 60
seconds_idle < 60Description
TRUEnever evaluated
FALSEnever evaluated
)
0
203 return
never executed: return " . ";
" . ";
never executed: return " . ";
0
204 else-
205 {-
206 static char idle_hhmm[6];-
207-
208-
209 -
210 ((-
211 seconds_idle / (60 * 60) < 24-
212 ) ? (void) (0) : __assert_fail (-
213 "seconds_idle / (60 * 60) < 24"-
214 , "src/who.c", 205, __PRETTY_FUNCTION__))-
215 ;-
216 sprintf (idle_hhmm, "%02d:%02d",-
217 seconds_idle / (60 * 60),-
218 (seconds_idle % (60 * 60)) / 60);-
219 return
never executed: return idle_hhmm;
idle_hhmm;
never executed: return idle_hhmm;
0
220 }-
221 }-
222-
223 return
executed 1 time by 1 test: return dcgettext (((void *)0), " old " , 5) ;
Executed by:
  • who
executed 1 time by 1 test: return dcgettext (((void *)0), " old " , 5) ;
Executed by:
  • who
1
224 dcgettext (((void *)0),
executed 1 time by 1 test: return dcgettext (((void *)0), " old " , 5) ;
Executed by:
  • who
1
225 " old "
executed 1 time by 1 test: return dcgettext (((void *)0), " old " , 5) ;
Executed by:
  • who
1
226 , 5)
executed 1 time by 1 test: return dcgettext (((void *)0), " old " , 5) ;
Executed by:
  • who
1
227 ;
executed 1 time by 1 test: return dcgettext (((void *)0), " old " , 5) ;
Executed by:
  • who
1
228}-
229-
230-
231static const char *-
232time_string (const STRUCT_UTMP *utmp_ent)-
233{-
234 static char buf[(((((sizeof (intmax_t) * 8) - (! ((__typeof__ (intmax_t)) 0 < (__typeof__ (intmax_t)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (intmax_t)) 0 < (__typeof__ (intmax_t)) -1))) + sizeof "-%m-%d %H:%M"];-
235-
236-
237-
238-
239-
240-
241-
242 time_t t = ((utmp_ent)->ut_tv.tv_sec);-
243 struct tm *tmp = localtime (&t);-
244-
245 if (tmp
tmpDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • who
FALSEnever evaluated
)
0-1
246 {-
247 strftime (buf, sizeof buf, time_format, tmp);-
248 return
executed 1 time by 1 test: return buf;
Executed by:
  • who
buf;
executed 1 time by 1 test: return buf;
Executed by:
  • who
1
249 }-
250 else-
251 return
never executed: return timetostr (t, buf);
timetostr (t, buf);
never executed: return timetostr (t, buf);
0
252}-
253-
254-
255-
256-
257static void-
258print_line (int userlen, const char *user, const char state,-
259 int linelen, const char *line,-
260 const char *time_str, const char *idle, const char *pid,-
261 const char *comment, const char *exitstr)-
262{-
263 static char mesg[3] = { ' ', 'x', '\0' };-
264 char *buf;-
265 char x_idle[1 + 6 + 1];-
266 char x_pid[1 + (((((sizeof (pid_t) * 8) - (! ((__typeof__ (pid_t)) 0 < (__typeof__ (pid_t)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (pid_t)) 0 < (__typeof__ (pid_t)) -1))) + 1];-
267 char *x_exitstr;-
268 int err;-
269-
270 mesg[1] = state;-
271-
272 if (include_idle
include_idleDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • who
&& !short_output
!short_outputDescription
TRUEnever evaluated
FALSEnever evaluated
&& strlen (idle) < sizeof x_idle - 1
strlen (idle) ...eof x_idle - 1Description
TRUEnever evaluated
FALSEnever evaluated
)
0-1
273 sprintf (x_idle, " %-6s", idle);
never executed: sprintf (x_idle, " %-6s", idle);
0
274 else-
275 *
executed 1 time by 1 test: *x_idle = '\0';
Executed by:
  • who
x_idle = '\0';
executed 1 time by 1 test: *x_idle = '\0';
Executed by:
  • who
1
276-
277 if (!short_output
!short_outputDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • who
&& strlen (pid) < sizeof x_pid - 1
strlen (pid) <...zeof x_pid - 1Description
TRUEnever evaluated
FALSEnever evaluated
)
0-1
278 sprintf (x_pid, " %10s", pid);
never executed: sprintf (x_pid, " %10s", pid);
0
279 else-
280 *
executed 1 time by 1 test: *x_pid = '\0';
Executed by:
  • who
x_pid = '\0';
executed 1 time by 1 test: *x_pid = '\0';
Executed by:
  • who
1
281-
282 x_exitstr = xmalloc (include_exit ? 1 + -
283 (((-
284 12-
285 )>(-
286 strlen (exitstr)-
287 ))?(-
288 12-
289 ):(-
290 strlen (exitstr)-
291 )) -
292 + 1 : 1);-
293 if (include_exit
include_exitDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • who
)
0-1
294 sprintf (x_exitstr, " %-12s", exitstr);
never executed: sprintf (x_exitstr, " %-12s", exitstr);
0
295 else-
296 *
executed 1 time by 1 test: *x_exitstr = '\0';
Executed by:
  • who
x_exitstr = '\0';
executed 1 time by 1 test: *x_exitstr = '\0';
Executed by:
  • who
1
297-
298 err = asprintf (&buf,-
299 "%-8.*s"-
300 "%s"-
301 " %-12.*s"-
302 " %-*s"-
303 "%s"-
304 "%s"-
305 " %-8s"-
306 "%s"-
307 ,-
308 userlen, user ? user : " .",-
309 include_mesg ? mesg : "",-
310 linelen, line,-
311 time_format_width,-
312 time_str,-
313 x_idle,-
314 x_pid,-
315-
316-
317-
318-
319 comment,-
320 x_exitstr-
321 );-
322 if (err == -1
err == -1Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • who
)
0-1
323 xalloc_die ();
never executed: xalloc_die ();
0
324-
325 {-
326-
327 char *p = buf + strlen (buf);-
328 while (*--
*--p == ' 'Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • who
FALSEevaluated 1 time by 1 test
Evaluated by:
  • who
p == ' '
*--p == ' 'Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • who
FALSEevaluated 1 time by 1 test
Evaluated by:
  • who
)
1-4
329 ;
executed 4 times by 1 test: ;
Executed by:
  • who
4
330 *(p + 1) = '\0';-
331 }-
332-
333 puts (buf);-
334 free (buf);-
335 free (x_exitstr);-
336}
executed 1 time by 1 test: end of block
Executed by:
  • who
1
337-
338-
339-
340static -
341 _Bool-
342-
343is_tty_writable (struct stat const *pstat)-
344{-
345 return
executed 1 time by 1 test: return pstat->st_mode & (0200 >> 3) ;
Executed by:
  • who
pstat->st_mode &
executed 1 time by 1 test: return pstat->st_mode & (0200 >> 3) ;
Executed by:
  • who
1
346 (0200 >> 3)
executed 1 time by 1 test: return pstat->st_mode & (0200 >> 3) ;
Executed by:
  • who
1
347 ;
executed 1 time by 1 test: return pstat->st_mode & (0200 >> 3) ;
Executed by:
  • who
1
348}-
349-
350-
351-
352static void-
353print_user (const STRUCT_UTMP *utmp_ent, time_t boottime)-
354{-
355 struct stat stats;-
356 time_t last_change;-
357 char mesg;-
358 char idlestr[6 + 1];-
359 static char *hoststr;-
360-
361 static size_t hostlen;-
362-
363-
364-
365-
366-
367 char line[sizeof (utmp_ent->ut_line) + (sizeof ("/dev/") - 1) + 1];-
368 char *p = line;-
369 char pidstr[(((((sizeof (utmp_ent->ut_pid) * 8) - (! ((__typeof__ (utmp_ent->ut_pid)) 0 < (__typeof__ (utmp_ent->ut_pid)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (utmp_ent->ut_pid)) 0 < (__typeof__ (utmp_ent->ut_pid)) -1))) + 1]; sprintf (pidstr, "%ld", (long int) (utmp_ent->ut_pid));-
370-
371-
372-
373-
374 if ( ! ((((
(((utmp_ent->u...e)[0]) == '/')Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • who
utmp_ent->ut_line)[0]) == '/')
(((utmp_ent->u...e)[0]) == '/')Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • who
|| 0 != 0
0 != 0Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • who
))
0-1
375 p = stpcpy (p, "/dev/");
executed 1 time by 1 test: p = stpcpy (p, "/dev/");
Executed by:
  • who
1
376 stzncpy (p, utmp_ent->ut_line, sizeof (utmp_ent->ut_line));-
377-
378 if (stat (line, &stats) == 0
stat (line, &stats) == 0Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • who
FALSEnever evaluated
)
0-1
379 {-
380 mesg = is_tty_writable (&stats)
is_tty_writable (&stats)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • who
FALSEnever evaluated
? '+' : '-';
0-1
381 last_change = stats.-
382 st_atim.tv_sec-
383 ;-
384 }
executed 1 time by 1 test: end of block
Executed by:
  • who
1
385 else-
386 {-
387 mesg = '?';-
388 last_change = 0;-
389 }
never executed: end of block
0
390-
391 if (last_change
last_changeDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • who
FALSEnever evaluated
)
0-1
392 sprintf (idlestr, "%.*s", 6, idle_string (last_change, boottime));
executed 1 time by 1 test: sprintf (idlestr, "%.*s", 6, idle_string (last_change, boottime));
Executed by:
  • who
1
393 else-
394 sprintf (idlestr, " ?");
never executed: sprintf (idlestr, " ?");
0
395-
396-
397 if (utmp_ent->ut_host[0]
utmp_ent->ut_host[0]Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • who
FALSEnever evaluated
)
0-1
398 {-
399 char ut_host[sizeof (utmp_ent->ut_host) + 1];-
400 char *host = -
401 ((void *)0)-
402 ;-
403 char *display = -
404 ((void *)0)-
405 ;-
406-
407-
408 stzncpy (ut_host, utmp_ent->ut_host, sizeof (utmp_ent->ut_host));-
409-
410-
411 display = -
412 (__extension__ (__builtin_constant_p (
__builtin_constant_p ( ':' )Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • who
FALSEnever evaluated
0-1
413 ':'
__builtin_constant_p ( ':' )Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • who
FALSEnever evaluated
0-1
414 )
__builtin_constant_p ( ':' )Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • who
FALSEnever evaluated
&& !__builtin_constant_p (
!__builtin_con..._p ( ut_host )Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • who
FALSEnever evaluated
0-1
415 ut_host
!__builtin_con..._p ( ut_host )Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • who
FALSEnever evaluated
0-1
416 )
!__builtin_con..._p ( ut_host )Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • who
FALSEnever evaluated
&& (
( ':' ) == '\0'Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • who
0-1
417 ':'
( ':' ) == '\0'Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • who
0-1
418 ) == '\0'
( ':' ) == '\0'Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • who
? (char *) __rawmemchr (
0-1
419 ut_host-
420 , -
421 ':'-
422 ) : __builtin_strchr (-
423 ut_host-
424 , -
425 ':'-
426 )))-
427 ;-
428 if (display
displayDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • who
FALSEnever evaluated
)
0-1
429 *
executed 1 time by 1 test: *display++ = '\0';
Executed by:
  • who
display++ = '\0';
executed 1 time by 1 test: *display++ = '\0';
Executed by:
  • who
1
430-
431 if (*
*ut_hostDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • who
ut_host
*ut_hostDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • who
&& do_lookup
do_lookupDescription
TRUEnever evaluated
FALSEnever evaluated
)
0-1
432 {-
433-
434 host = canon_host (ut_host);-
435 }
never executed: end of block
0
436-
437 if (! host
! hostDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • who
FALSEnever evaluated
)
0-1
438 host = ut_host;
executed 1 time by 1 test: host = ut_host;
Executed by:
  • who
1
439-
440 if (display
displayDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • who
FALSEnever evaluated
)
0-1
441 {-
442 if (hostlen < strlen (host) + strlen (display) + 4
hostlen < strl... (display) + 4Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • who
FALSEnever evaluated
)
0-1
443 {-
444 hostlen = strlen (host) + strlen (display) + 4;-
445 free (hoststr);-
446 hoststr = xmalloc (hostlen);-
447 }
executed 1 time by 1 test: end of block
Executed by:
  • who
1
448 sprintf (hoststr, "(%s:%s)", host, display);-
449 }
executed 1 time by 1 test: end of block
Executed by:
  • who
1
450 else-
451 {-
452 if (hostlen < strlen (host) + 3
hostlen < strlen (host) + 3Description
TRUEnever evaluated
FALSEnever evaluated
)
0
453 {-
454 hostlen = strlen (host) + 3;-
455 free (hoststr);-
456 hoststr = xmalloc (hostlen);-
457 }
never executed: end of block
0
458 sprintf (hoststr, "(%s)", host);-
459 }
never executed: end of block
0
460-
461 if (host != ut_host
host != ut_hostDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • who
)
0-1
462 free (host);
never executed: free (host);
0
463 }
executed 1 time by 1 test: end of block
Executed by:
  • who
1
464 else-
465 {-
466 if (hostlen < 1
hostlen < 1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
467 {-
468 hostlen = 1;-
469 free (hoststr);-
470 hoststr = xmalloc (hostlen);-
471 }
never executed: end of block
0
472 *hoststr = '\0';-
473 }
never executed: end of block
0
474-
475-
476 print_line (sizeof ((utmp_ent)->-
477 ut_user-
478 ), ((utmp_ent)->-
479 ut_user-
480 ), mesg,-
481 sizeof utmp_ent->ut_line, utmp_ent->ut_line,-
482 time_string (utmp_ent), idlestr, pidstr,-
483 hoststr ? hoststr : "", "");-
484}
executed 1 time by 1 test: end of block
Executed by:
  • who
1
485-
486static void-
487print_boottime (const STRUCT_UTMP *utmp_ent)-
488{-
489 print_line (-1, "", ' ', -1, -
490 dcgettext (((void *)0), -
491 "system boot"-
492 , 5)-
493 ,-
494 time_string (utmp_ent), "", "", "", "");-
495}
never executed: end of block
0
496-
497static char *-
498make_id_equals_comment (STRUCT_UTMP const *utmp_ent)-
499{-
500 char *comment = xmalloc (strlen (-
501 dcgettext (((void *)0), -
502 "id="-
503 , 5)-
504 ) + sizeof ((utmp_ent)->ut_id) + 1);-
505-
506 strcpy (comment, -
507 dcgettext (((void *)0), -
508 "id="-
509 , 5)-
510 );-
511 strncat (comment, ((utmp_ent)->ut_id), sizeof ((utmp_ent)->ut_id));-
512 return
never executed: return comment;
comment;
never executed: return comment;
0
513}-
514-
515static void-
516print_deadprocs (const STRUCT_UTMP *utmp_ent)-
517{-
518 static char *exitstr;-
519 char *comment = make_id_equals_comment (utmp_ent);-
520 char pidstr[(((((sizeof (utmp_ent->ut_pid) * 8) - (! ((__typeof__ (utmp_ent->ut_pid)) 0 < (__typeof__ (utmp_ent->ut_pid)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (utmp_ent->ut_pid)) 0 < (__typeof__ (utmp_ent->ut_pid)) -1))) + 1]; sprintf (pidstr, "%ld", (long int) (utmp_ent->ut_pid));-
521-
522 if (!exitstr
!exitstrDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
523 exitstr = xmalloc (strlen (
never executed: exitstr = xmalloc (strlen ( dcgettext (((void *)0), "term=" , 5) ) + (((((sizeof (((utmp_ent)->ut_exit.e_termination)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_termination))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_termination))) -1))) * 146 + 484) ...ut_exit.e_exit)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) * 146 + 484) / 485) + (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) + 1);
0
524 dcgettext (((void *)0),
never executed: exitstr = xmalloc (strlen ( dcgettext (((void *)0), "term=" , 5) ) + (((((sizeof (((utmp_ent)->ut_exit.e_termination)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_termination))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_termination))) -1))) * 146 + 484) ...ut_exit.e_exit)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) * 146 + 484) / 485) + (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) + 1);
0
525 "term="
never executed: exitstr = xmalloc (strlen ( dcgettext (((void *)0), "term=" , 5) ) + (((((sizeof (((utmp_ent)->ut_exit.e_termination)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_termination))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_termination))) -1))) * 146 + 484) ...ut_exit.e_exit)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) * 146 + 484) / 485) + (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) + 1);
0
526 , 5)
never executed: exitstr = xmalloc (strlen ( dcgettext (((void *)0), "term=" , 5) ) + (((((sizeof (((utmp_ent)->ut_exit.e_termination)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_termination))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_termination))) -1))) * 146 + 484) ...ut_exit.e_exit)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) * 146 + 484) / 485) + (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) + 1);
0
527 )
never executed: exitstr = xmalloc (strlen ( dcgettext (((void *)0), "term=" , 5) ) + (((((sizeof (((utmp_ent)->ut_exit.e_termination)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_termination))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_termination))) -1))) * 146 + 484) ...ut_exit.e_exit)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) * 146 + 484) / 485) + (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) + 1);
0
528 + (((((sizeof (((utmp_ent)->ut_exit.e_termination)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_termination))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_termination))) -1))) * 146 + 484) / 485) + (! ((__typeof__ (((utmp_ent)->ut_exit.e_termination))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_termination))) -1))) + 1
never executed: exitstr = xmalloc (strlen ( dcgettext (((void *)0), "term=" , 5) ) + (((((sizeof (((utmp_ent)->ut_exit.e_termination)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_termination))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_termination))) -1))) * 146 + 484) ...ut_exit.e_exit)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) * 146 + 484) / 485) + (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) + 1);
0
529 + strlen (
never executed: exitstr = xmalloc (strlen ( dcgettext (((void *)0), "term=" , 5) ) + (((((sizeof (((utmp_ent)->ut_exit.e_termination)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_termination))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_termination))) -1))) * 146 + 484) ...ut_exit.e_exit)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) * 146 + 484) / 485) + (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) + 1);
0
530 dcgettext (((void *)0),
never executed: exitstr = xmalloc (strlen ( dcgettext (((void *)0), "term=" , 5) ) + (((((sizeof (((utmp_ent)->ut_exit.e_termination)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_termination))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_termination))) -1))) * 146 + 484) ...ut_exit.e_exit)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) * 146 + 484) / 485) + (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) + 1);
0
531 "exit="
never executed: exitstr = xmalloc (strlen ( dcgettext (((void *)0), "term=" , 5) ) + (((((sizeof (((utmp_ent)->ut_exit.e_termination)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_termination))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_termination))) -1))) * 146 + 484) ...ut_exit.e_exit)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) * 146 + 484) / 485) + (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) + 1);
0
532 , 5)
never executed: exitstr = xmalloc (strlen ( dcgettext (((void *)0), "term=" , 5) ) + (((((sizeof (((utmp_ent)->ut_exit.e_termination)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_termination))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_termination))) -1))) * 146 + 484) ...ut_exit.e_exit)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) * 146 + 484) / 485) + (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) + 1);
0
533 )
never executed: exitstr = xmalloc (strlen ( dcgettext (((void *)0), "term=" , 5) ) + (((((sizeof (((utmp_ent)->ut_exit.e_termination)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_termination))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_termination))) -1))) * 146 + 484) ...ut_exit.e_exit)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) * 146 + 484) / 485) + (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) + 1);
0
534 + (((((sizeof (((utmp_ent)->ut_exit.e_exit)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) * 146 + 484) / 485) + (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1)))
never executed: exitstr = xmalloc (strlen ( dcgettext (((void *)0), "term=" , 5) ) + (((((sizeof (((utmp_ent)->ut_exit.e_termination)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_termination))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_termination))) -1))) * 146 + 484) ...ut_exit.e_exit)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) * 146 + 484) / 485) + (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) + 1);
0
535 + 1);
never executed: exitstr = xmalloc (strlen ( dcgettext (((void *)0), "term=" , 5) ) + (((((sizeof (((utmp_ent)->ut_exit.e_termination)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_termination))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_termination))) -1))) * 146 + 484) ...ut_exit.e_exit)) * 8) - (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) * 146 + 484) / 485) + (! ((__typeof__ (((utmp_ent)->ut_exit.e_exit))) 0 < (__typeof__ (((utmp_ent)->ut_exit.e_exit))) -1))) + 1);
0
536 sprintf (exitstr, "%s%d %s%d", -
537 dcgettext (((void *)0), -
538 "term="-
539 , 5)-
540 , ((utmp_ent)->ut_exit.e_termination),-
541 -
542 dcgettext (((void *)0), -
543 "exit="-
544 , 5)-
545 , ((utmp_ent)->ut_exit.e_exit));-
546-
547-
548-
549 print_line (-1, "", ' ', sizeof utmp_ent->ut_line, utmp_ent->ut_line,-
550 time_string (utmp_ent), "", pidstr, comment, exitstr);-
551 free (comment);-
552}
never executed: end of block
0
553-
554static void-
555print_login (const STRUCT_UTMP *utmp_ent)-
556{-
557 char *comment = make_id_equals_comment (utmp_ent);-
558 char pidstr[(((((sizeof (utmp_ent->ut_pid) * 8) - (! ((__typeof__ (utmp_ent->ut_pid)) 0 < (__typeof__ (utmp_ent->ut_pid)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (utmp_ent->ut_pid)) 0 < (__typeof__ (utmp_ent->ut_pid)) -1))) + 1]; sprintf (pidstr, "%ld", (long int) (utmp_ent->ut_pid));-
559-
560-
561-
562 print_line (-1, -
563 dcgettext (((void *)0), -
564 "LOGIN"-
565 , 5)-
566 , ' ', sizeof utmp_ent->ut_line, utmp_ent->ut_line,-
567 time_string (utmp_ent), "", pidstr, comment, "");-
568 free (comment);-
569}
never executed: end of block
0
570-
571static void-
572print_initspawn (const STRUCT_UTMP *utmp_ent)-
573{-
574 char *comment = make_id_equals_comment (utmp_ent);-
575 char pidstr[(((((sizeof (utmp_ent->ut_pid) * 8) - (! ((__typeof__ (utmp_ent->ut_pid)) 0 < (__typeof__ (utmp_ent->ut_pid)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (utmp_ent->ut_pid)) 0 < (__typeof__ (utmp_ent->ut_pid)) -1))) + 1]; sprintf (pidstr, "%ld", (long int) (utmp_ent->ut_pid));-
576-
577 print_line (-1, "", ' ', sizeof utmp_ent->ut_line, utmp_ent->ut_line,-
578 time_string (utmp_ent), "", pidstr, comment, "");-
579 free (comment);-
580}
never executed: end of block
0
581-
582static void-
583print_clockchange (const STRUCT_UTMP *utmp_ent)-
584{-
585-
586 print_line (-1, "", ' ', -1, -
587 dcgettext (((void *)0), -
588 "clock change"-
589 , 5)-
590 ,-
591 time_string (utmp_ent), "", "", "", "");-
592}
never executed: end of block
0
593-
594static void-
595print_runlevel (const STRUCT_UTMP *utmp_ent)-
596{-
597 static char *runlevline, *comment;-
598 unsigned char last = ((utmp_ent)->ut_pid) / 256;-
599 unsigned char curr = ((utmp_ent)->ut_pid) % 256;-
600-
601 if (!runlevline
!runlevlineDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
602 runlevline = xmalloc (strlen (
never executed: runlevline = xmalloc (strlen ( dcgettext (((void *)0), "run-level" , 5) ) + 3);
0
603 dcgettext (((void *)0),
never executed: runlevline = xmalloc (strlen ( dcgettext (((void *)0), "run-level" , 5) ) + 3);
0
604 "run-level"
never executed: runlevline = xmalloc (strlen ( dcgettext (((void *)0), "run-level" , 5) ) + 3);
0
605 , 5)
never executed: runlevline = xmalloc (strlen ( dcgettext (((void *)0), "run-level" , 5) ) + 3);
0
606 ) + 3);
never executed: runlevline = xmalloc (strlen ( dcgettext (((void *)0), "run-level" , 5) ) + 3);
0
607 sprintf (runlevline, "%s %c", -
608 dcgettext (((void *)0), -
609 "run-level"-
610 , 5)-
611 , curr);-
612-
613 if (!comment
!commentDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
614 comment = xmalloc (strlen (
never executed: comment = xmalloc (strlen ( dcgettext (((void *)0), "last=" , 5) ) + 2);
0
615 dcgettext (((void *)0),
never executed: comment = xmalloc (strlen ( dcgettext (((void *)0), "last=" , 5) ) + 2);
0
616 "last="
never executed: comment = xmalloc (strlen ( dcgettext (((void *)0), "last=" , 5) ) + 2);
0
617 , 5)
never executed: comment = xmalloc (strlen ( dcgettext (((void *)0), "last=" , 5) ) + 2);
0
618 ) + 2);
never executed: comment = xmalloc (strlen ( dcgettext (((void *)0), "last=" , 5) ) + 2);
0
619 sprintf (comment, "%s%c", -
620 dcgettext (((void *)0), -
621 "last="-
622 , 5)-
623 , (last == 'N') ? 'S' : last);-
624-
625 print_line (-1, "", ' ', -1, runlevline, time_string (utmp_ent),-
626 "", "", c_isprint (last) ? comment : "", "");-
627-
628 return;
never executed: return;
0
629}-
630-
631-
632-
633static void-
634list_entries_who (size_t n, const STRUCT_UTMP *utmp_buf)-
635{-
636 unsigned long int entries = 0;-
637 char const *separator = "";-
638-
639 while (n--
n--Description
TRUEnever evaluated
FALSEnever evaluated
)
0
640 {-
641 if ((((
((utmp_buf)-> ut_user )[0]Description
TRUEnever evaluated
FALSEnever evaluated
utmp_buf)->
((utmp_buf)-> ut_user )[0]Description
TRUEnever evaluated
FALSEnever evaluated
0
642 ut_user
((utmp_buf)-> ut_user )[0]Description
TRUEnever evaluated
FALSEnever evaluated
0
643 )[0]
((utmp_buf)-> ut_user )[0]Description
TRUEnever evaluated
FALSEnever evaluated
&& (((
((utmp_buf)->ut_type == ( 7 ))Description
TRUEnever evaluated
FALSEnever evaluated
utmp_buf)->ut_type == (
((utmp_buf)->ut_type == ( 7 ))Description
TRUEnever evaluated
FALSEnever evaluated
0
644 7
((utmp_buf)->ut_type == ( 7 ))Description
TRUEnever evaluated
FALSEnever evaluated
0
645 ))
((utmp_buf)->ut_type == ( 7 ))Description
TRUEnever evaluated
FALSEnever evaluated
|| (0 && ((
dead code: ((utmp_buf)->ut_tv.tv_sec) != 0
utmp_buf)->ut_tv.tv_sec) != 0
dead code: ((utmp_buf)->ut_tv.tv_sec) != 0
))))
-
646 {-
647 char *trimmed_name;-
648-
649 trimmed_name = extract_trimmed_name (utmp_buf);-
650-
651 printf ("%s%s", separator, trimmed_name);-
652 free (trimmed_name);-
653 separator = " ";-
654 entries++;-
655 }
never executed: end of block
0
656 utmp_buf++;-
657 }
never executed: end of block
0
658 printf (-
659 dcgettext (((void *)0), -
660 "\n# users=%lu\n"-
661 , 5)-
662 , entries);-
663}
never executed: end of block
0
664-
665static void-
666print_heading (void)-
667{-
668 print_line (-1, -
669 dcgettext (((void *)0), -
670 "NAME"-
671 , 5)-
672 , ' ', -1, -
673 dcgettext (((void *)0), -
674 "LINE"-
675 , 5)-
676 , -
677 dcgettext (((void *)0), -
678 "TIME"-
679 , 5)-
680 , -
681 dcgettext (((void *)0), -
682 "IDLE"-
683 , 5)-
684 ,-
685 -
686 dcgettext (((void *)0), -
687 "PID"-
688 , 5)-
689 , -
690 dcgettext (((void *)0), -
691 "COMMENT"-
692 , 5)-
693 , -
694 dcgettext (((void *)0), -
695 "EXIT"-
696 , 5)-
697 );-
698}
never executed: end of block
0
699-
700-
701static void-
702scan_entries (size_t n, const STRUCT_UTMP *utmp_buf)-
703{-
704 char *ttyname_b ;-
705 time_t boottime = ((time_t) ~ ((time_t) (! (! ((time_t) 0 < (time_t) -1)) ? (time_t) -1 : ((((time_t) 1 << ((sizeof (time_t) * 8) - 2)) - 1) * 2 + 1))));-
706-
707 if (include_heading
include_headingDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • who
)
0-1
708 print_heading ();
never executed: print_heading ();
0
709-
710 if (my_line_only
my_line_onlyDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • who
)
0-1
711 {-
712 ttyname_b = ttyname (-
713 0-
714 );-
715 if (!ttyname_b
!ttyname_bDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
716 return;
never executed: return;
0
717 if (-
718 (
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
__extension__ (__builtin_constant_p (
__builtin_cons..."/dev/") - 1 )Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
719 sizeof ("/dev/") - 1
__builtin_cons..."/dev/") - 1 )Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
720 )
__builtin_cons..."/dev/") - 1 )Description
TRUEnever evaluated
FALSEnever evaluated
&& ((__builtin_constant_p (
__builtin_cons... ( ttyname_b )Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
721 ttyname_b
__builtin_cons... ( ttyname_b )Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
722 )
__builtin_cons... ( ttyname_b )Description
TRUEnever evaluated
FALSEnever evaluated
&& strlen (
strlen ( ttyna.../dev/") - 1 ))Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
723 ttyname_b
strlen ( ttyna.../dev/") - 1 ))Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
724 ) < ((size_t) (
strlen ( ttyna.../dev/") - 1 ))Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
725 sizeof ("/dev/") - 1
strlen ( ttyna.../dev/") - 1 ))Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
726 ))
strlen ( ttyna.../dev/") - 1 ))Description
TRUEnever evaluated
FALSEnever evaluated
) || (__builtin_constant_p (
__builtin_cons..." "/dev/" "" )Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
727 "" "/dev/" ""
__builtin_cons..." "/dev/" "" )Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
728 )
__builtin_cons..." "/dev/" "" )Description
TRUEnever evaluated
FALSEnever evaluated
&& strlen (
strlen ( "" "/.../dev/") - 1 ))Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
729 "" "/dev/" ""
strlen ( "" "/.../dev/") - 1 ))Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
730 ) < ((size_t) (
strlen ( "" "/.../dev/") - 1 ))Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
731 sizeof ("/dev/") - 1
strlen ( "" "/.../dev/") - 1 ))Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
732 ))
strlen ( "" "/.../dev/") - 1 ))Description
TRUEnever evaluated
FALSEnever evaluated
)) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
733 ttyname_b
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
734 ) && __builtin_constant_p (
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
735 "" "/dev/" ""
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
736 ) && (__s1_len = __builtin_strlen (
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
737 ttyname_b
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
738 ), __s2_len = __builtin_strlen (
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
739 "" "/dev/" ""
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
740 ), (!((size_t)(const void *)((
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
741 ttyname_b
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
742 ) + 1) - (size_t)(const void *)(
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
743 ttyname_b
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
744 ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
745 "" "/dev/" ""
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
746 ) + 1) - (size_t)(const void *)(
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
747 "" "/dev/" ""
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
748 ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
749 ttyname_b
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
750 ,
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
751 "" "/dev/" ""
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
752 ) : (__builtin_constant_p (
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
753 ttyname_b
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
754 ) && ((size_t)(const void *)((
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
755 ttyname_b
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
756 ) + 1) - (size_t)(const void *)(
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
757 ttyname_b
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
758 ) == 1) && (__s1_len = __builtin_strlen (
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
759 ttyname_b
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
760 ), __s1_len < 4) ? (__builtin_constant_p (
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
761 "" "/dev/" ""
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
762 ) && ((size_t)(const void *)((
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
763 "" "/dev/" ""
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
764 ) + 1) - (size_t)(const void *)(
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
765 "" "/dev/" ""
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
766 ) == 1) ? __builtin_strcmp (
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
767 ttyname_b
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
768 ,
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
769 "" "/dev/" ""
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
770 ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
771 "" "/dev/" ""
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
772 ); int __result = (((const unsigned char *) (const char *) (
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
773 ttyname_b
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
774 ))[0] - __s2[0]); if (__s1_len > 0
__s1_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
775 ttyname_b
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
776 ))[1] - __s2[1]); if (__s1_len > 1
__s1_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
777 ttyname_b
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
778 ))[2] - __s2[2]); if (__s1_len > 2
__s1_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) __result = (((const unsigned char *) (const char *) (
never executed: __result = (((const unsigned char *) (const char *) ( ttyname_b ))[3] - __s2[3]);
0
779 ttyname_b
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
never executed: __result = (((const unsigned char *) (const char *) ( ttyname_b ))[3] - __s2[3]);
0
780 ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
781 "" "/dev/" ""
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
782 ) && ((size_t)(const void *)((
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
783 "" "/dev/" ""
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
784 ) + 1) - (size_t)(const void *)(
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
785 "" "/dev/" ""
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
786 ) == 1) && (__s2_len = __builtin_strlen (
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
787 "" "/dev/" ""
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
788 ), __s2_len < 4) ? (__builtin_constant_p (
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
789 ttyname_b
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
790 ) && ((size_t)(const void *)((
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
791 ttyname_b
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
792 ) + 1) - (size_t)(const void *)(
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
793 ttyname_b
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
794 ) == 1) ? __builtin_strcmp (
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
795 ttyname_b
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
796 ,
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
797 "" "/dev/" ""
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
798 ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
799 ttyname_b
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
800 ); int __result = (((const unsigned char *) (const char *) (
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
801 "" "/dev/" ""
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
802 ))[0] - __s2[0]); if (__s2_len > 0
__s2_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
803 "" "/dev/" ""
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
804 ))[1] - __s2[1]); if (__s2_len > 1
__s2_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
805 "" "/dev/" ""
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
806 ))[2] - __s2[2]); if (__s2_len > 2
__s2_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) __result = (((const unsigned char *) (const char *) (
never executed: __result = (((const unsigned char *) (const char *) ( "" "/dev/" "" ))[3] - __s2[3]);
0
807 "" "/dev/" ""
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
never executed: __result = (((const unsigned char *) (const char *) ( "" "/dev/" "" ))[3] - __s2[3]);
0
808 ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
809 ttyname_b
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
810 ,
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
811 "" "/dev/" ""
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
812 )))); }) : strncmp (
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
813 ttyname_b
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
814 ,
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
815 "" "/dev/" ""
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
816 ,
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
817 sizeof ("/dev/") - 1
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
818 )))
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
819 == 0
(__extension__...) - 1 ))) == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
820 ttyname_b += (sizeof ("/dev/") - 1);
never executed: ttyname_b += (sizeof ("/dev/") - 1);
0
821 }
never executed: end of block
0
822-
823 while (n--
n--Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • who
FALSEevaluated 1 time by 1 test
Evaluated by:
  • who
)
1-4
824 {-
825 if (!my_line_only
!my_line_onlyDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • who
FALSEnever evaluated
0-4
826 || (
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
827 (__extension__ (__builtin_constant_p (
__builtin_cons...uf->ut_line) )Description
TRUEnever evaluated
FALSEnever evaluated
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
828 sizeof (utmp_buf->ut_line)
__builtin_cons...uf->ut_line) )Description
TRUEnever evaluated
FALSEnever evaluated
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
829 )
__builtin_cons...uf->ut_line) )Description
TRUEnever evaluated
FALSEnever evaluated
&& ((__builtin_constant_p (
__builtin_cons... ( ttyname_b )Description
TRUEnever evaluated
FALSEnever evaluated
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
830 ttyname_b
__builtin_cons... ( ttyname_b )Description
TRUEnever evaluated
FALSEnever evaluated
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
831 )
__builtin_cons... ( ttyname_b )Description
TRUEnever evaluated
FALSEnever evaluated
&& strlen (
strlen ( ttyna...f->ut_line) ))Description
TRUEnever evaluated
FALSEnever evaluated
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
832 ttyname_b
strlen ( ttyna...f->ut_line) ))Description
TRUEnever evaluated
FALSEnever evaluated
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
833 ) < ((size_t) (
strlen ( ttyna...f->ut_line) ))Description
TRUEnever evaluated
FALSEnever evaluated
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
834 sizeof (utmp_buf->ut_line)
strlen ( ttyna...f->ut_line) ))Description
TRUEnever evaluated
FALSEnever evaluated
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
835 ))
strlen ( ttyna...f->ut_line) ))Description
TRUEnever evaluated
FALSEnever evaluated
) || (__builtin_constant_p (
__builtin_cons...buf->ut_line )Description
TRUEnever evaluated
FALSEnever evaluated
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
836 utmp_buf->ut_line
__builtin_cons...buf->ut_line )Description
TRUEnever evaluated
FALSEnever evaluated
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
837 )
__builtin_cons...buf->ut_line )Description
TRUEnever evaluated
FALSEnever evaluated
&& strlen (
strlen ( utmp_...f->ut_line) ))Description
TRUEnever evaluated
FALSEnever evaluated
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
838 utmp_buf->ut_line
strlen ( utmp_...f->ut_line) ))Description
TRUEnever evaluated
FALSEnever evaluated
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
839 ) < ((size_t) (
strlen ( utmp_...f->ut_line) ))Description
TRUEnever evaluated
FALSEnever evaluated
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
840 sizeof (utmp_buf->ut_line)
strlen ( utmp_...f->ut_line) ))Description
TRUEnever evaluated
FALSEnever evaluated
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
841 ))
strlen ( utmp_...f->ut_line) ))Description
TRUEnever evaluated
FALSEnever evaluated
)) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
842 ttyname_b
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
843 ) && __builtin_constant_p (
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
844 utmp_buf->ut_line
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
845 ) && (__s1_len = __builtin_strlen (
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
846 ttyname_b
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
847 ), __s2_len = __builtin_strlen (
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
848 utmp_buf->ut_line
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
849 ), (!((size_t)(const void *)((
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
850 ttyname_b
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
851 ) + 1) - (size_t)(const void *)(
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
852 ttyname_b
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
853 ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
854 utmp_buf->ut_line
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
855 ) + 1) - (size_t)(const void *)(
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
856 utmp_buf->ut_line
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
857 ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
858 ttyname_b
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
859 ,
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
860 utmp_buf->ut_line
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
861 ) : (__builtin_constant_p (
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
862 ttyname_b
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
863 ) && ((size_t)(const void *)((
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
864 ttyname_b
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
865 ) + 1) - (size_t)(const void *)(
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
866 ttyname_b
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
867 ) == 1) && (__s1_len = __builtin_strlen (
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
868 ttyname_b
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
869 ), __s1_len < 4) ? (__builtin_constant_p (
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
870 utmp_buf->ut_line
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
871 ) && ((size_t)(const void *)((
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
872 utmp_buf->ut_line
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
873 ) + 1) - (size_t)(const void *)(
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
874 utmp_buf->ut_line
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
875 ) == 1) ? __builtin_strcmp (
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
876 ttyname_b
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
877 ,
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
878 utmp_buf->ut_line
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
879 ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
880 utmp_buf->ut_line
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
881 ); int __result = (((const unsigned char *) (const char *) (
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
882 ttyname_b
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
883 ))[0] - __s2[0]); if (__s1_len > 0
__s1_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
884 ttyname_b
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
885 ))[1] - __s2[1]); if (__s1_len > 1
__s1_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
886 ttyname_b
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
887 ))[2] - __s2[2]); if (__s1_len > 2
__s1_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) __result = (((const unsigned char *) (const char *) (
never executed: __result = (((const unsigned char *) (const char *) ( ttyname_b ))[3] - __s2[3]);
0
888 ttyname_b
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
never executed: __result = (((const unsigned char *) (const char *) ( ttyname_b ))[3] - __s2[3]);
0
889 ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
890 utmp_buf->ut_line
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
891 ) && ((size_t)(const void *)((
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
892 utmp_buf->ut_line
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
893 ) + 1) - (size_t)(const void *)(
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
894 utmp_buf->ut_line
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
895 ) == 1) && (__s2_len = __builtin_strlen (
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
896 utmp_buf->ut_line
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
897 ), __s2_len < 4) ? (__builtin_constant_p (
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
898 ttyname_b
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
899 ) && ((size_t)(const void *)((
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
900 ttyname_b
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
901 ) + 1) - (size_t)(const void *)(
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
902 ttyname_b
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
903 ) == 1) ? __builtin_strcmp (
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
904 ttyname_b
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
905 ,
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
906 utmp_buf->ut_line
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
907 ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
908 ttyname_b
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
909 ); int __result = (((const unsigned char *) (const char *) (
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
910 utmp_buf->ut_line
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
911 ))[0] - __s2[0]); if (__s2_len > 0
__s2_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
912 utmp_buf->ut_line
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
913 ))[1] - __s2[1]); if (__s2_len > 1
__s2_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
914 utmp_buf->ut_line
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
915 ))[2] - __s2[2]); if (__s2_len > 2
__s2_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) __result = (((const unsigned char *) (const char *) (
never executed: __result = (((const unsigned char *) (const char *) ( utmp_buf->ut_line ))[3] - __s2[3]);
0
916 utmp_buf->ut_line
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
never executed: __result = (((const unsigned char *) (const char *) ( utmp_buf->ut_line ))[3] - __s2[3]);
0
917 ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
918 ttyname_b
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
919 ,
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
920 utmp_buf->ut_line
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
921 )))); }) : strncmp (
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
922 ttyname_b
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
923 ,
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
924 utmp_buf->ut_line
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
925 ,
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
926 sizeof (utmp_buf->ut_line)
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
927 )))
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
928 == 0)
( (__extension...ine) ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
929 )-
930 {-
931 if (need_users
need_usersDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • who
FALSEnever evaluated
&& (((
((utmp_buf)-> ut_user )[0]Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • who
FALSEnever evaluated
utmp_buf)->
((utmp_buf)-> ut_user )[0]Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • who
FALSEnever evaluated
0-4
932 ut_user
((utmp_buf)-> ut_user )[0]Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • who
FALSEnever evaluated
0-4
933 )[0]
((utmp_buf)-> ut_user )[0]Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • who
FALSEnever evaluated
&& (((
((utmp_buf)->ut_type == ( 7 ))Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • who
FALSEevaluated 3 times by 1 test
Evaluated by:
  • who
utmp_buf)->ut_type == (
((utmp_buf)->ut_type == ( 7 ))Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • who
FALSEevaluated 3 times by 1 test
Evaluated by:
  • who
0-4
934 7
((utmp_buf)->ut_type == ( 7 ))Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • who
FALSEevaluated 3 times by 1 test
Evaluated by:
  • who
1-3
935 ))
((utmp_buf)->ut_type == ( 7 ))Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • who
FALSEevaluated 3 times by 1 test
Evaluated by:
  • who
|| (0 && ((
dead code: ((utmp_buf)->ut_tv.tv_sec) != 0
utmp_buf)->ut_tv.tv_sec) != 0
dead code: ((utmp_buf)->ut_tv.tv_sec) != 0
))))
-
936 print_user (utmp_buf, boottime);
executed 1 time by 1 test: print_user (utmp_buf, boottime);
Executed by:
  • who
1
937 else if (need_runlevel
need_runlevelDescription
TRUEnever evaluated
FALSEevaluated 3 times by 1 test
Evaluated by:
  • who
&& ((
((utmp_buf)->ut_type == ( 1 ))Description
TRUEnever evaluated
FALSEnever evaluated
utmp_buf)->ut_type == (
((utmp_buf)->ut_type == ( 1 ))Description
TRUEnever evaluated
FALSEnever evaluated
0-3
938 1
((utmp_buf)->ut_type == ( 1 ))Description
TRUEnever evaluated
FALSEnever evaluated
0
939 ))
((utmp_buf)->ut_type == ( 1 ))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
940 print_runlevel (utmp_buf);
never executed: print_runlevel (utmp_buf);
0
941 else if (need_boottime
need_boottimeDescription
TRUEnever evaluated
FALSEevaluated 3 times by 1 test
Evaluated by:
  • who
&& ((
((utmp_buf)->ut_type == ( 2 ))Description
TRUEnever evaluated
FALSEnever evaluated
utmp_buf)->ut_type == (
((utmp_buf)->ut_type == ( 2 ))Description
TRUEnever evaluated
FALSEnever evaluated
0-3
942 2
((utmp_buf)->ut_type == ( 2 ))Description
TRUEnever evaluated
FALSEnever evaluated
0
943 ))
((utmp_buf)->ut_type == ( 2 ))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
944 print_boottime (utmp_buf);
never executed: print_boottime (utmp_buf);
0
945-
946-
947-
948 else if (need_clockchange
need_clockchangeDescription
TRUEnever evaluated
FALSEevaluated 3 times by 1 test
Evaluated by:
  • who
&& ((
((utmp_buf)->ut_type == ( 3 ))Description
TRUEnever evaluated
FALSEnever evaluated
utmp_buf)->ut_type == (
((utmp_buf)->ut_type == ( 3 ))Description
TRUEnever evaluated
FALSEnever evaluated
0-3
949 3
((utmp_buf)->ut_type == ( 3 ))Description
TRUEnever evaluated
FALSEnever evaluated
0
950 ))
((utmp_buf)->ut_type == ( 3 ))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
951 print_clockchange (utmp_buf);
never executed: print_clockchange (utmp_buf);
0
952 else if (need_initspawn
need_initspawnDescription
TRUEnever evaluated
FALSEevaluated 3 times by 1 test
Evaluated by:
  • who
&& ((
((utmp_buf)->ut_type == ( 5 ))Description
TRUEnever evaluated
FALSEnever evaluated
utmp_buf)->ut_type == (
((utmp_buf)->ut_type == ( 5 ))Description
TRUEnever evaluated
FALSEnever evaluated
0-3
953 5
((utmp_buf)->ut_type == ( 5 ))Description
TRUEnever evaluated
FALSEnever evaluated
0
954 ))
((utmp_buf)->ut_type == ( 5 ))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
955 print_initspawn (utmp_buf);
never executed: print_initspawn (utmp_buf);
0
956 else if (need_login
need_loginDescription
TRUEnever evaluated
FALSEevaluated 3 times by 1 test
Evaluated by:
  • who
&& ((
((utmp_buf)->ut_type == ( 6 ))Description
TRUEnever evaluated
FALSEnever evaluated
utmp_buf)->ut_type == (
((utmp_buf)->ut_type == ( 6 ))Description
TRUEnever evaluated
FALSEnever evaluated
0-3
957 6
((utmp_buf)->ut_type == ( 6 ))Description
TRUEnever evaluated
FALSEnever evaluated
0
958 ))
((utmp_buf)->ut_type == ( 6 ))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
959 print_login (utmp_buf);
never executed: print_login (utmp_buf);
0
960 else if (need_deadprocs
need_deadprocsDescription
TRUEnever evaluated
FALSEevaluated 3 times by 1 test
Evaluated by:
  • who
&& ((
((utmp_buf)->ut_type == ( 8 ))Description
TRUEnever evaluated
FALSEnever evaluated
utmp_buf)->ut_type == (
((utmp_buf)->ut_type == ( 8 ))Description
TRUEnever evaluated
FALSEnever evaluated
0-3
961 8
((utmp_buf)->ut_type == ( 8 ))Description
TRUEnever evaluated
FALSEnever evaluated
0
962 ))
((utmp_buf)->ut_type == ( 8 ))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
963 print_deadprocs (utmp_buf);
never executed: print_deadprocs (utmp_buf);
0
964 }
executed 4 times by 1 test: end of block
Executed by:
  • who
4
965-
966 if (((
((utmp_buf)->ut_type == ( 2 ))Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • who
FALSEevaluated 3 times by 1 test
Evaluated by:
  • who
utmp_buf)->ut_type == (
((utmp_buf)->ut_type == ( 2 ))Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • who
FALSEevaluated 3 times by 1 test
Evaluated by:
  • who
1-3
967 2
((utmp_buf)->ut_type == ( 2 ))Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • who
FALSEevaluated 3 times by 1 test
Evaluated by:
  • who
1-3
968 ))
((utmp_buf)->ut_type == ( 2 ))Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • who
FALSEevaluated 3 times by 1 test
Evaluated by:
  • who
)
1-3
969 boottime = ((utmp_buf)->ut_tv.tv_sec);
executed 1 time by 1 test: boottime = ((utmp_buf)->ut_tv.tv_sec);
Executed by:
  • who
1
970-
971 utmp_buf++;-
972 }
executed 4 times by 1 test: end of block
Executed by:
  • who
4
973}
executed 1 time by 1 test: end of block
Executed by:
  • who
1
974-
975-
976-
977static void-
978who (const char *filename, int options)-
979{-
980 size_t n_users;-
981 STRUCT_UTMP *utmp_buf;-
982-
983 if (read_utmp (filename, &n_users, &utmp_buf, options) != 0
read_utmp (fil... options) != 0Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • who
)
0-1
984 ((
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ...(0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
!!sizeof (struct { _Static_assert (
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ...(0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
985 1
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ...(0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
986 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error (
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ...(0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
987 1
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ...(0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
988 ,
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ...(0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
989 (*__errno_location ())
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ...(0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
990 , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), ((
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ...(0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
991 0
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ...(0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
992 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ...(0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
993 1
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ...(0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
994 ,
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ...(0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
995 (*__errno_location ())
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ...(0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
996 , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), ((
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ...(0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
997 0
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ...(0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
998 ) ? (void) 0 : __builtin_unreachable ()))));
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ...(0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
999-
1000 if (short_list
short_listDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • who
)
0-1
1001 list_entries_who (n_users, utmp_buf);
never executed: list_entries_who (n_users, utmp_buf);
0
1002 else-
1003 scan_entries (n_users, utmp_buf);
executed 1 time by 1 test: scan_entries (n_users, utmp_buf);
Executed by:
  • who
1
1004-
1005 free (utmp_buf);-
1006}
executed 1 time by 1 test: end of block
Executed by:
  • who
1
1007-
1008void-
1009usage (int status)-
1010{-
1011 if (status !=
status != 0Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • who
FALSEevaluated 32 times by 1 test
Evaluated by:
  • who
3-32
1012 0
status != 0Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • who
FALSEevaluated 32 times by 1 test
Evaluated by:
  • who
3-32
1013 )-
1014 do { fprintf (-
1015 stderr-
1016 , -
1017 dcgettext (((void *)0), -
1018 "Try '%s --help' for more information.\n"-
1019 , 5)-
1020 , program_name); }
executed 3 times by 1 test: end of block
Executed by:
  • who
while (0);
3
1021 else-
1022 {-
1023 printf (-
1024 dcgettext (((void *)0), -
1025 "Usage: %s [OPTION]... [ FILE | ARG1 ARG2 ]\n"-
1026 , 5)-
1027 , program_name);-
1028 fputs_unlocked (-
1029 dcgettext (((void *)0), -
1030 "Print information about users who are currently logged in.\n"-
1031 , 5)-
1032 ,-
1033 stdout-
1034 )-
1035-
1036 ;-
1037 fputs_unlocked (-
1038 dcgettext (((void *)0), -
1039 "\n -a, --all same as -b -d --login -p -r -t -T -u\n -b, --boot time of last system boot\n -d, --dead print dead processes\n -H, --heading print line of column headings\n"-
1040 , 5)-
1041 ,-
1042 stdout-
1043 )-
1044-
1045-
1046-
1047-
1048-
1049 ;-
1050 fputs_unlocked (-
1051 dcgettext (((void *)0), -
1052 " -l, --login print system login processes\n"-
1053 , 5)-
1054 ,-
1055 stdout-
1056 )-
1057-
1058 ;-
1059 fputs_unlocked (-
1060 dcgettext (((void *)0), -
1061 " --lookup attempt to canonicalize hostnames via DNS\n -m only hostname and user associated with stdin\n -p, --process print active processes spawned by init\n"-
1062 , 5)-
1063 ,-
1064 stdout-
1065 )-
1066-
1067-
1068-
1069 ;-
1070 fputs_unlocked (-
1071 dcgettext (((void *)0), -
1072 " -q, --count all login names and number of users logged on\n -r, --runlevel print current runlevel\n -s, --short print only name, line, and time (default)\n -t, --time print last system clock change\n"-
1073 , 5)-
1074 ,-
1075 stdout-
1076 )-
1077-
1078-
1079-
1080-
1081 ;-
1082 fputs_unlocked (-
1083 dcgettext (((void *)0), -
1084 " -T, -w, --mesg add user's message status as +, - or ?\n -u, --users list users logged in\n --message same as -T\n --writable same as -T\n"-
1085 , 5)-
1086 ,-
1087 stdout-
1088 )-
1089-
1090-
1091-
1092-
1093 ;-
1094 fputs_unlocked (-
1095 dcgettext (((void *)0), -
1096 " --help display this help and exit\n"-
1097 , 5)-
1098 ,-
1099 stdout-
1100 );-
1101 fputs_unlocked (-
1102 dcgettext (((void *)0), -
1103 " --version output version information and exit\n"-
1104 , 5)-
1105 ,-
1106 stdout-
1107 );-
1108 printf (-
1109 dcgettext (((void *)0), -
1110 "\nIf FILE is not specified, use %s. %s as FILE is common.\nIf ARG1 ARG2 given, -m presumed: 'am i' or 'mom likes' are usual.\n"-
1111 , 5)-
1112-
1113-
1114-
1115 -
1116 , -
1117 "/var/run/utmp"-
1118 , -
1119 "/var/log/wtmp"-
1120 );-
1121 emit_ancillary_info ("who");-
1122 }
executed 32 times by 1 test: end of block
Executed by:
  • who
32
1123 exit (status);
executed 35 times by 1 test: exit (status);
Executed by:
  • who
35
1124}-
1125-
1126int-
1127main (int argc, char **argv)-
1128{-
1129 int optc;-
1130 -
1131 _Bool -
1132 assumptions = -
1133 1-
1134 ;-
1135-
1136 ;-
1137 set_program_name (argv[0]);-
1138 setlocale (-
1139 6-
1140 , "");-
1141 bindtextdomain ("coreutils", "/usr/local/share/locale");-
1142 textdomain ("coreutils");-
1143-
1144 atexit (close_stdout);-
1145-
1146 while ((
(optc = getopt... *)0) )) != -1Description
TRUEevaluated 67 times by 1 test
Evaluated by:
  • who
FALSEevaluated 1 time by 1 test
Evaluated by:
  • who
optc = getopt_long (argc, argv, "abdlmpqrstuwHT", longopts,
(optc = getopt... *)0) )) != -1Description
TRUEevaluated 67 times by 1 test
Evaluated by:
  • who
FALSEevaluated 1 time by 1 test
Evaluated by:
  • who
1-67
1147 ((void *)0)
(optc = getopt... *)0) )) != -1Description
TRUEevaluated 67 times by 1 test
Evaluated by:
  • who
FALSEevaluated 1 time by 1 test
Evaluated by:
  • who
1-67
1148 ))
(optc = getopt... *)0) )) != -1Description
TRUEevaluated 67 times by 1 test
Evaluated by:
  • who
FALSEevaluated 1 time by 1 test
Evaluated by:
  • who
1-67
1149 != -1
(optc = getopt... *)0) )) != -1Description
TRUEevaluated 67 times by 1 test
Evaluated by:
  • who
FALSEevaluated 1 time by 1 test
Evaluated by:
  • who
)
1-67
1150 {-
1151 switch (optc)-
1152 {-
1153 case
executed 2 times by 1 test: case 'a':
Executed by:
  • who
'a':
executed 2 times by 1 test: case 'a':
Executed by:
  • who
2
1154 need_boottime = -
1155 1-
1156 ;-
1157 need_deadprocs = -
1158 1-
1159 ;-
1160 need_login = -
1161 1-
1162 ;-
1163 need_initspawn = -
1164 1-
1165 ;-
1166 need_runlevel = -
1167 1-
1168 ;-
1169 need_clockchange = -
1170 1-
1171 ;-
1172 need_users = -
1173 1-
1174 ;-
1175 include_mesg = -
1176 1-
1177 ;-
1178 include_idle = -
1179 1-
1180 ;-
1181 include_exit = -
1182 1-
1183 ;-
1184 assumptions = -
1185 0-
1186 ;-
1187 break;
executed 2 times by 1 test: break;
Executed by:
  • who
2
1188-
1189 case
executed 2 times by 1 test: case 'b':
Executed by:
  • who
'b':
executed 2 times by 1 test: case 'b':
Executed by:
  • who
2
1190 need_boottime = -
1191 1-
1192 ;-
1193 assumptions = -
1194 0-
1195 ;-
1196 break;
executed 2 times by 1 test: break;
Executed by:
  • who
2
1197-
1198 case
executed 2 times by 1 test: case 'd':
Executed by:
  • who
'd':
executed 2 times by 1 test: case 'd':
Executed by:
  • who
2
1199 need_deadprocs = -
1200 1-
1201 ;-
1202 include_idle = -
1203 1-
1204 ;-
1205 include_exit = -
1206 1-
1207 ;-
1208 assumptions = -
1209 0-
1210 ;-
1211 break;
executed 2 times by 1 test: break;
Executed by:
  • who
2
1212-
1213 case
executed 2 times by 1 test: case 'H':
Executed by:
  • who
'H':
executed 2 times by 1 test: case 'H':
Executed by:
  • who
2
1214 include_heading = -
1215 1-
1216 ;-
1217 break;
executed 2 times by 1 test: break;
Executed by:
  • who
2
1218-
1219 case
executed 2 times by 1 test: case 'l':
Executed by:
  • who
'l':
executed 2 times by 1 test: case 'l':
Executed by:
  • who
2
1220 need_login = -
1221 1-
1222 ;-
1223 include_idle = -
1224 1-
1225 ;-
1226 assumptions = -
1227 0-
1228 ;-
1229 break;
executed 2 times by 1 test: break;
Executed by:
  • who
2
1230-
1231 case
executed 1 time by 1 test: case 'm':
Executed by:
  • who
'm':
executed 1 time by 1 test: case 'm':
Executed by:
  • who
1
1232 my_line_only = -
1233 1-
1234 ;-
1235 break;
executed 1 time by 1 test: break;
Executed by:
  • who
1
1236-
1237 case
executed 2 times by 1 test: case 'p':
Executed by:
  • who
'p':
executed 2 times by 1 test: case 'p':
Executed by:
  • who
2
1238 need_initspawn = -
1239 1-
1240 ;-
1241 assumptions = -
1242 0-
1243 ;-
1244 break;
executed 2 times by 1 test: break;
Executed by:
  • who
2
1245-
1246 case
executed 2 times by 1 test: case 'q':
Executed by:
  • who
'q':
executed 2 times by 1 test: case 'q':
Executed by:
  • who
2
1247 short_list = -
1248 1-
1249 ;-
1250 break;
executed 2 times by 1 test: break;
Executed by:
  • who
2
1251-
1252 case
executed 2 times by 1 test: case 'r':
Executed by:
  • who
'r':
executed 2 times by 1 test: case 'r':
Executed by:
  • who
2
1253 need_runlevel = -
1254 1-
1255 ;-
1256 include_idle = -
1257 1-
1258 ;-
1259 assumptions = -
1260 0-
1261 ;-
1262 break;
executed 2 times by 1 test: break;
Executed by:
  • who
2
1263-
1264 case
executed 2 times by 1 test: case 's':
Executed by:
  • who
's':
executed 2 times by 1 test: case 's':
Executed by:
  • who
2
1265 short_output = -
1266 1-
1267 ;-
1268 break;
executed 2 times by 1 test: break;
Executed by:
  • who
2
1269-
1270 case
executed 2 times by 1 test: case 't':
Executed by:
  • who
't':
executed 2 times by 1 test: case 't':
Executed by:
  • who
2
1271 need_clockchange = -
1272 1-
1273 ;-
1274 assumptions = -
1275 0-
1276 ;-
1277 break;
executed 2 times by 1 test: break;
Executed by:
  • who
2
1278-
1279 case
executed 4 times by 1 test: case 'T':
Executed by:
  • who
'T':
executed 4 times by 1 test: case 'T':
Executed by:
  • who
4
1280 case
executed 1 time by 1 test: case 'w':
Executed by:
  • who
'w':
executed 1 time by 1 test: case 'w':
Executed by:
  • who
1
1281 include_mesg = -
1282 1-
1283 ;-
1284 break;
executed 5 times by 1 test: break;
Executed by:
  • who
5
1285-
1286 case
executed 2 times by 1 test: case 'u':
Executed by:
  • who
'u':
executed 2 times by 1 test: case 'u':
Executed by:
  • who
2
1287 need_users = -
1288 1-
1289 ;-
1290 include_idle = -
1291 1-
1292 ;-
1293 assumptions = -
1294 0-
1295 ;-
1296 break;
executed 2 times by 1 test: break;
Executed by:
  • who
2
1297-
1298 case
executed 1 time by 1 test: case LOOKUP_OPTION:
Executed by:
  • who
LOOKUP_OPTION:
executed 1 time by 1 test: case LOOKUP_OPTION:
Executed by:
  • who
1
1299 do_lookup = -
1300 1-
1301 ;-
1302 break;
executed 1 time by 1 test: break;
Executed by:
  • who
1
1303-
1304 case
executed 32 times by 1 test: case GETOPT_HELP_CHAR:
Executed by:
  • who
GETOPT_HELP_CHAR:
executed 32 times by 1 test: case GETOPT_HELP_CHAR:
Executed by:
  • who
usage (
32
1305 0-
1306 ); break;
never executed: break;
;
0
1307-
1308 case
executed 3 times by 1 test: case GETOPT_VERSION_CHAR:
Executed by:
  • who
GETOPT_VERSION_CHAR:
executed 3 times by 1 test: case GETOPT_VERSION_CHAR:
Executed by:
  • who
version_etc (
3
1309 stdout-
1310 , "who", "GNU coreutils", Version, ("Joseph Arceneaux"), ("David MacKenzie"), ("Michael Stone"), (char *) -
1311 ((void *)0)-
1312 ); exit (
executed 3 times by 1 test: exit ( 0 );
Executed by:
  • who
3
1313 0
executed 3 times by 1 test: exit ( 0 );
Executed by:
  • who
3
1314 );
executed 3 times by 1 test: exit ( 0 );
Executed by:
  • who
break;
never executed: break;
;
0-3
1315-
1316 default
executed 3 times by 1 test: default:
Executed by:
  • who
:
executed 3 times by 1 test: default:
Executed by:
  • who
3
1317 usage (-
1318 1-
1319 );-
1320 }
never executed: end of block
0
1321 }-
1322-
1323 if (assumptions
assumptionsDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • who
FALSEnever evaluated
)
0-1
1324 {-
1325 need_users = -
1326 1-
1327 ;-
1328 short_output = -
1329 1-
1330 ;-
1331 }
executed 1 time by 1 test: end of block
Executed by:
  • who
1
1332-
1333 if (include_exit
include_exitDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • who
)
0-1
1334 {-
1335 short_output = -
1336 0-
1337 ;-
1338 }
never executed: end of block
0
1339-
1340 if (hard_locale (
hard_locale ( 2 )Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • who
0-1
1341 2
hard_locale ( 2 )Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • who
0-1
1342 )
hard_locale ( 2 )Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • who
)
0-1
1343 {-
1344 time_format = "%Y-%m-%d %H:%M";-
1345 time_format_width = 4 + 1 + 2 + 1 + 2 + 1 + 2 + 1 + 2;-
1346 }
never executed: end of block
0
1347 else-
1348 {-
1349 time_format = "%b %e %H:%M";-
1350 time_format_width = 3 + 1 + 2 + 1 + 2 + 1 + 2;-
1351 }
executed 1 time by 1 test: end of block
Executed by:
  • who
1
1352-
1353 switch (argc - optind)-
1354 {-
1355 case
never executed: case 2:
2:
never executed: case 2:
0
1356 my_line_only = -
1357 1-
1358 ;-
1359 ((void) 0);-
1360 case
never executed: case -1:
-1:
never executed: case -1:
code before this statement never executed: case -1:
0
1361 case
executed 1 time by 1 test: case 0:
Executed by:
  • who
0:
executed 1 time by 1 test: case 0:
Executed by:
  • who
1
1362 who (-
1363 "/var/run/utmp"-
1364 , READ_UTMP_CHECK_PIDS);-
1365 break;
executed 1 time by 1 test: break;
Executed by:
  • who
1
1366-
1367 case
never executed: case 1:
1:
never executed: case 1:
0
1368 who (argv[optind], 0);-
1369 break;
never executed: break;
0
1370-
1371 default
never executed: default:
:
never executed: default:
0
1372 error (0, 0, -
1373 dcgettext (((void *)0), -
1374 "extra operand %s"-
1375 , 5)-
1376 , quote (argv[optind + 2]));-
1377 usage (-
1378 1-
1379 );-
1380 }
never executed: end of block
0
1381-
1382 return
executed 1 time by 1 test: return 0 ;
Executed by:
  • who
executed 1 time by 1 test: return 0 ;
Executed by:
  • who
1
1383 0
executed 1 time by 1 test: return 0 ;
Executed by:
  • who
1
1384 ;
executed 1 time by 1 test: return 0 ;
Executed by:
  • who
1
1385}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.1.2