diff options
author | Anders Magnusson <ragge@cvs.openbsd.org> | 2008-06-23 20:51:09 +0000 |
---|---|---|
committer | Anders Magnusson <ragge@cvs.openbsd.org> | 2008-06-23 20:51:09 +0000 |
commit | f16e4a8bc9221bf9c3401c8d6339ebe714ce58c5 (patch) | |
tree | c787c0e738a20389b94ffdde79523db34c6606d4 /usr.bin | |
parent | fa448016fe817df11f8dcff53102fe2962cb22ed (diff) |
Some conformance fixes:
- Empty brackets forbidden in C99.
- ? : and skipping middle argument is both disallowed and considered bad
programming habit.
OK ray@, xsa@.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/cvs/edit.c | 12 | ||||
-rw-r--r-- | usr.bin/cvs/init.c | 4 | ||||
-rw-r--r-- | usr.bin/cvs/remove.c | 5 | ||||
-rw-r--r-- | usr.bin/cvs/watch.c | 6 |
4 files changed, 14 insertions, 13 deletions
diff --git a/usr.bin/cvs/edit.c b/usr.bin/cvs/edit.c index ef22aa61385..c4e6802bd07 100644 --- a/usr.bin/cvs/edit.c +++ b/usr.bin/cvs/edit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: edit.c,v 1.47 2008/06/14 03:19:15 joris Exp $ */ +/* $OpenBSD: edit.c,v 1.48 2008/06/23 20:51:08 ragge Exp $ */ /* * Copyright (c) 2006, 2007 Xavier Santolaria <xsa@openbsd.org> * @@ -44,7 +44,7 @@ static int edit_aflags = 0; struct cvs_cmd cvs_cmd_edit = { CVS_OP_EDIT, CVS_USE_WDIR, "edit", - { }, + { { 0 }, { 0 } }, "Get ready to edit a watched file", "[-lR] [-a action] [file ...]", "a:lR", @@ -54,7 +54,7 @@ struct cvs_cmd cvs_cmd_edit = { struct cvs_cmd cvs_cmd_editors = { CVS_OP_EDITORS, CVS_USE_WDIR, "editors", - { }, + { { 0 }, { 0 } }, "See who is editing a watched file", "[-lR] [file ...]", "lR", @@ -64,7 +64,7 @@ struct cvs_cmd cvs_cmd_editors = { struct cvs_cmd cvs_cmd_unedit = { CVS_OP_UNEDIT, CVS_USE_WDIR, "unedit", - { }, + { { 0 }, { 0 } }, "Undo an edit command", "[-lR] [file ...]", "lR", @@ -402,8 +402,8 @@ cvs_unedit_local(struct cvs_file *cf) cf->file_ent->ce_tag); (void)xasprintf(&entry, "/%s/%s/%s/%s/%s", - cf->file_name, rbuf, timebuf, cf->file_ent->ce_opts ? : "", - sticky); + cf->file_name, rbuf, timebuf, cf->file_ent->ce_opts ? + cf->file_ent->ce_opts : "", sticky); cvs_ent_add(entlist, entry); diff --git a/usr.bin/cvs/init.c b/usr.bin/cvs/init.c index 07f3cd17c97..33e88816b38 100644 --- a/usr.bin/cvs/init.c +++ b/usr.bin/cvs/init.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init.c,v 1.34 2008/06/10 15:50:31 tobias Exp $ */ +/* $OpenBSD: init.c,v 1.35 2008/06/23 20:51:08 ragge Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * Copyright (c) 2006 Xavier Santolaria <xsa@openbsd.org> @@ -72,7 +72,7 @@ static const char *cvsroot_dirs[2] = { struct cvs_cmd cvs_cmd_init = { CVS_OP_INIT, 0, "init", - { }, + { { 0 }, { 0 } }, "Create a CVS repository if it doesn't exist", "", "", diff --git a/usr.bin/cvs/remove.c b/usr.bin/cvs/remove.c index e52975fd0af..63f23fb3c4f 100644 --- a/usr.bin/cvs/remove.c +++ b/usr.bin/cvs/remove.c @@ -1,4 +1,4 @@ -/* $OpenBSD: remove.c,v 1.78 2008/06/14 03:19:15 joris Exp $ */ +/* $OpenBSD: remove.c,v 1.79 2008/06/23 20:51:08 ragge Exp $ */ /* * Copyright (c) 2005, 2006 Xavier Santolaria <xsa@openbsd.org> * @@ -200,7 +200,8 @@ cvs_remove_local(struct cvs_file *cf) entry = xmalloc(CVS_ENT_MAXLINELEN); cvs_ent_line_str(cf->file_name, rbuf, tbuf, - cf->file_ent->ce_opts ? : "", sticky, 0, 1, + cf->file_ent->ce_opts ? + cf->file_ent->ce_opts : "", sticky, 0, 1, entry, CVS_ENT_MAXLINELEN); if (cvs_server_active == 1) { diff --git a/usr.bin/cvs/watch.c b/usr.bin/cvs/watch.c index 0073d5f9042..8d850b6fdff 100644 --- a/usr.bin/cvs/watch.c +++ b/usr.bin/cvs/watch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: watch.c,v 1.20 2008/01/31 10:15:05 tobias Exp $ */ +/* $OpenBSD: watch.c,v 1.21 2008/06/23 20:51:08 ragge Exp $ */ /* * Copyright (c) 2005-2007 Xavier Santolaria <xsa@openbsd.org> * @@ -38,7 +38,7 @@ static int watch_aflags = 0; struct cvs_cmd cvs_cmd_watch = { CVS_OP_WATCH, CVS_USE_WDIR, "watch", - { }, + { { 0 }, { 0 } }, "Set watches", "on | off | add | remove [-lR] [-a action] [file ...]", "a:lR", @@ -48,7 +48,7 @@ struct cvs_cmd cvs_cmd_watch = { struct cvs_cmd cvs_cmd_watchers = { CVS_OP_WATCHERS, CVS_USE_WDIR, "watchers", - { }, + { { 0 }, { 0 } }, "See who is watching a file", "[-lR] [file ...]", "lR", |