From b43991414ccef9c16a1a33d0bcbb03588f1fb205 Mon Sep 17 00:00:00 2001 From: cdez Date: Wed, 5 Feb 2025 18:39:16 -0700 Subject: [PATCH] fix the segfault? --- timeserver/timeserver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/timeserver/timeserver.c b/timeserver/timeserver.c index 9e0885d..ccf56e2 100644 --- a/timeserver/timeserver.c +++ b/timeserver/timeserver.c @@ -50,7 +50,7 @@ int main(int argc, char **argv) { // char *reply; - sprintf(reply, "%d", time(NULL)); + sprintf(&reply, "%d", time(NULL)); printf("%s", reply); // char *reply = time(NULL); // char *reply = "Replied";