Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/sysinst sysinst: fix lint error about empty compoun...



details:   https://anonhg.NetBSD.org/src/rev/c10e34f32efe
branches:  trunk
changeset: 986238:c10e34f32efe
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Sep 14 21:45:20 2021 +0000

description:
sysinst: fix lint error about empty compound literal

In C99, a compound literal must have at least one expression between the
braces.  Empty structs and compound literals are a GNU extension.

The first member of struct part_entry has type size_t, therefore 0 fits
well.

No functional change.

diffstat:

 usr.sbin/sysinst/partman.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (24 lines):

diff -r 3034c0841db3 -r c10e34f32efe usr.sbin/sysinst/partman.c
--- a/usr.sbin/sysinst/partman.c        Tue Sep 14 20:45:19 2021 +0000
+++ b/usr.sbin/sysinst/partman.c        Tue Sep 14 21:45:20 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: partman.c,v 1.52 2021/07/17 11:32:50 martin Exp $ */
+/*     $NetBSD: partman.c,v 1.53 2021/09/14 21:45:20 rillig Exp $ */
 
 /*
  * Copyright 2012 Eugene Lozovoy
@@ -403,12 +403,12 @@
                (num_devs+1<3)?3:num_devs+1, 13,
                MC_SCROLL | MC_NOCLEAR, NULL, NULL, NULL, NULL, MSG_cancel);
        if (menu_no == -1)
-               return (struct part_entry) { };
+               return (struct part_entry) { 0 };
        process_menu(menu_no, &dev_num);
        free_menu(menu_no);
 
        if (dev_num < 0 || dev_num >= num_devs)
-               return (struct part_entry) { };
+               return (struct part_entry) { 0 };
 
        pm_retvalue = dev_num;
        return disk_entries[dev_num];



Home | Main Index | Thread Index | Old Index