Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/usbdevs Use symbolic constants EXIT_SUCCESS, EXIT_F...
details: https://anonhg.NetBSD.org/src/rev/d2ca8b5f8d60
branches: trunk
changeset: 787849:d2ca8b5f8d60
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Mon Jul 08 14:47:18 2013 +0000
description:
Use symbolic constants EXIT_SUCCESS, EXIT_FAILURE, and NULL where appropriate.
diffstat:
usr.sbin/usbdevs/usbdevs.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (43 lines):
diff -r 12ae298bb39f -r d2ca8b5f8d60 usr.sbin/usbdevs/usbdevs.c
--- a/usr.sbin/usbdevs/usbdevs.c Mon Jul 08 08:21:12 2013 +0000
+++ b/usr.sbin/usbdevs/usbdevs.c Mon Jul 08 14:47:18 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: usbdevs.c,v 1.28 2011/08/30 20:51:29 joerg Exp $ */
+/* $NetBSD: usbdevs.c,v 1.29 2013/07/08 14:47:18 jakllsch Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
fprintf(stderr, "usage: %s [-dv] [-a addr] [-f dev]\n",
getprogname());
- exit(1);
+ exit(EXIT_FAILURE);
}
static char done[USB_MAX_DEVICES];
@@ -198,7 +198,7 @@
{
int ch, i, f;
char buf[50];
- char *dev = 0;
+ char *dev = NULL;
int addr = 0;
int ncont;
@@ -224,7 +224,7 @@
argc -= optind;
argv += optind;
- if (dev == 0) {
+ if (dev == NULL) {
for (ncont = 0, i = 0; i < 10; i++) {
snprintf(buf, sizeof(buf), "%s%d", USBDEV, i);
f = open(buf, O_RDONLY);
@@ -248,5 +248,5 @@
else
err(1, "%s", dev);
}
- exit(0);
+ exit(EXIT_SUCCESS);
}
Home |
Main Index |
Thread Index |
Old Index