From e28bd8f02be98f9b30d429bc19b6e7570ae22f9c Mon Sep 17 00:00:00 2001 From: Omar Polo Date: Wed, 22 May 2024 08:41:03 +0000 Subject: align table_proc id printing with the rest of smtpd ok gilles@ --- usr.sbin/smtpd/table_proc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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"); -- cgit v1.2.3