From cd174d1f31632884b717eba69048d338605e7e70 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Thu, 28 Feb 2008 13:14:42 +0000 Subject: [PATCH] microcom: shrink --- miscutils/microcom.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/miscutils/microcom.c b/miscutils/microcom.c index 3c573eaa9..5219335a6 100644 --- a/miscutils/microcom.c +++ b/miscutils/microcom.c @@ -81,10 +81,7 @@ int microcom_main(int argc, char **argv) // %4d to make concurrent mgetty (if any) happy. // Mgetty treats 4-bytes lock files as binary, // not text, PID. Making 5+ char file. Brrr... - char *s = xasprintf("%4d\n", getpid()); - write(sfd, s, strlen(s)); - if (ENABLE_FEATURE_CLEAN_UP) - free(s); + fdprintf(sfd, "%4d\n", getpid()); close(sfd); } -- 2.25.1