Re: svn commit: r267027 - head/usr.bin/users

2014-06-06 Thread Bruce Evans
On Thu, 5 Jun 2014, Pietro Cerutti wrote: your comments do make sense. I semi-seriously suggest that we get rid of the current implementation and replace it with this. Comments? Not for me, thanks. ... int main(int argc, char **) { struct utmpx *ut; vector names; if

Re: svn commit: r267027 - head/usr.bin/users

2014-06-05 Thread Pietro Cerutti
Bruce, your comments do make sense. I semi-seriously suggest that we get rid of the current implementation and replace it with this. Comments? /* * Copyright (c) 2014 Pietro Cerutti * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification,

Re: svn commit: r267027 - head/usr.bin/users

2014-06-04 Thread Bruce Evans
On Tue, 3 Jun 2014, Pietro Cerutti wrote: Log: - Avoid calling a wrapper function around strcmp This changes correct code to give undefined behaviour. - Use sizeof(*array) instead of sizeof(element) everywhere This also allows removal of a typedef obfuscation. Modified: head/usr.bin/us

svn commit: r267027 - head/usr.bin/users

2014-06-03 Thread Pietro Cerutti
Author: gahr (ports committer) Date: Tue Jun 3 20:59:26 2014 New Revision: 267027 URL: http://svnweb.freebsd.org/changeset/base/267027 Log: - Avoid calling a wrapper function around strcmp - Use sizeof(*array) instead of sizeof(element) everywhere CR: D161 Approved by: cogne