From: anton Date: Mon, 30 Jul 2018 20:53:42 +0000 (+0000) Subject: Declare then assign local variable, no binary change. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ab8c6b02874f08b676f6df91f35eec2feb180ddd;p=openbsd Declare then assign local variable, no binary change. --- diff --git a/regress/sys/kern/open/open.c b/regress/sys/kern/open/open.c index 1088211bfe9..51136e22247 100644 --- a/regress/sys/kern/open/open.c +++ b/regress/sys/kern/open/open.c @@ -1,4 +1,4 @@ -/* $OpenBSD: open.c,v 1.1 2018/07/30 17:27:37 anton Exp $ */ +/* $OpenBSD: open.c,v 1.2 2018/07/30 20:53:42 anton Exp $ */ /* * Copyright (c) 2018 Anton Lindqvist * @@ -27,8 +27,9 @@ int main(void) { const char *path = "/dev/bpf"; + int fd; - int fd = open(path, O_WRONLY | O_TRUNC | O_SHLOCK); + fd = open(path, O_WRONLY | O_TRUNC | O_SHLOCK); if (fd == -1) err(1, "open: %s", path); close(fd);