[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
diskfs micro-optimisation
From: |
Alfred M. Szmidt |
Subject: |
diskfs micro-optimisation |
Date: |
Fri, 03 Dec 2004 10:35:31 +0100 |
OK?
Summary: diskfs optimization
Original Submission: A small optimization for ifsock.c by Neal Walfield:
libdiskfs/ChangeLog:
2001-06-20 Neal H Walfield <neal@cs.uml.edu>
* ifsock.c (diskfs_S_ifsock_getsockaddr): Don't use sprint
when we can just use the preprocessor.
Index: ifsock.c
===================================================================
RCS file: /home/neal/cvs/hurd/libdiskfs/ifsock.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 ifsock.c
--- ifsock.c 2001/06/03 20:53:19 1.1.1.1
+++ ifsock.c 2001/06/21 04:42:11
@@ -1,5 +1,5 @@
/* Implement ifsock inteface
- Copyright (C) 1994, 1996 Free Software Foundation
+ Copyright (C) 1994, 1996, 2001 Free Software Foundation
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -66,13 +66,11 @@
if (pflocalserver == MACH_PORT_NULL)
{
/* Find out who the PF_LOCAL server is. */
- char buf[100];
-
spin_unlock (&pflocalserverlock);
/* Look it up */
- sprintf (buf, "%s/%d", _SERVERS_SOCKET, PF_LOCAL);
- server = file_name_lookup (buf, 0, 0);
+ server = file_name_lookup (_SERVERS_SOCKET "/" STRINGIFY (PF_LOCAL),
+ 0, 0);
if (server == MACH_PORT_NULL)
return EIEIO;
- diskfs micro-optimisation,
Alfred M. Szmidt <=