From: op Date: Wed, 22 May 2024 08:41:02 +0000 (+0000) Subject: align table_proc id printing with the rest of smtpd X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=44444bbc1349bc35e3826bc4a5d3f956e8e6408c;p=openbsd align table_proc id printing with the rest of smtpd ok gilles@ --- diff --git a/usr.sbin/smtpd/table_proc.c b/usr.sbin/smtpd/table_proc.c index b823707eb30..07cabf073bc 100644 --- a/usr.sbin/smtpd/table_proc.c +++ b/usr.sbin/smtpd/table_proc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: table_proc.c,v 1.19 2024/05/14 13:28:08 op Exp $ */ +/* $OpenBSD: table_proc.c,v 1.20 2024/05/22 08:41:02 op Exp $ */ /* * Copyright (c) 2024 Omar Polo @@ -48,8 +48,7 @@ table_proc_nextid(struct table *table) struct table_proc_priv *priv = table->t_handle; int r; - r = snprintf(priv->lastid, sizeof(priv->lastid), "%lld", - (unsigned long long)arc4random()); + r = snprintf(priv->lastid, sizeof(priv->lastid), "%08x", arc4random()); if (r < 0 || (size_t)r >= sizeof(priv->lastid)) fatal("table-proc: snprintf");