Source-Changes-HG archive

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

[src/trunk]: src/sbin/gpt adjust gpt_uuid_generate() to accept gpt==NULL



details:   https://anonhg.NetBSD.org/src/rev/a2129567e843
branches:  trunk
changeset: 457435:a2129567e843
user:      jnemeth <jnemeth%NetBSD.org@localhost>
date:      Tue Jun 25 04:25:11 2019 +0000

description:
adjust gpt_uuid_generate() to accept gpt==NULL

diffstat:

 sbin/gpt/gpt_uuid.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r a5b18af0e5f2 -r a2129567e843 sbin/gpt/gpt_uuid.c
--- a/sbin/gpt/gpt_uuid.c       Tue Jun 25 03:42:45 2019 +0000
+++ b/sbin/gpt/gpt_uuid.c       Tue Jun 25 04:25:11 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gpt_uuid.c,v 1.17 2018/12/20 14:58:10 martin Exp $     */
+/*     $NetBSD: gpt_uuid.c,v 1.18 2019/06/25 04:25:11 jnemeth Exp $    */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 
 #include <sys/cdefs.h>
 #ifdef __RCSID
-__RCSID("$NetBSD: gpt_uuid.c,v 1.17 2018/12/20 14:58:10 martin Exp $");
+__RCSID("$NetBSD: gpt_uuid.c,v 1.18 2019/06/25 04:25:11 jnemeth Exp $");
 #endif
 
 #include <err.h>
@@ -321,7 +321,7 @@
 {
        int rv;
        struct dce_uuid u;
-       if (gpt->flags & GPT_TIMESTAMP)
+       if (gpt && (gpt->flags & GPT_TIMESTAMP))
                rv = gpt_uuid_tstamp(gpt, &u, sizeof(u));
        else
                rv = gpt_uuid_random(gpt, &u, sizeof(u));



Home | Main Index | Thread Index | Old Index