Deleted Added
full compact
print-sunrpc.c (56896) print-sunrpc.c (66644)
1/*
2 * Copyright (c) 1992, 1993, 1994, 1995, 1996
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that: (1) source code distributions
7 * retain the above copyright notice and this paragraph in its entirety, (2)
8 * distributions including binary code include the above copyright notice and

--- 4 unchanged lines hidden (view full) ---

13 * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
14 * the University nor the names of its contributors may be used to endorse
15 * or promote products derived from this software without specific prior
16 * written permission.
17 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
18 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
19 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
20 *
1/*
2 * Copyright (c) 1992, 1993, 1994, 1995, 1996
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that: (1) source code distributions
7 * retain the above copyright notice and this paragraph in its entirety, (2)
8 * distributions including binary code include the above copyright notice and

--- 4 unchanged lines hidden (view full) ---

13 * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
14 * the University nor the names of its contributors may be used to endorse
15 * or promote products derived from this software without specific prior
16 * written permission.
17 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
18 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
19 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
20 *
21 * $FreeBSD: head/contrib/tcpdump/print-sunrpc.c 56896 2000-01-30 01:05:24Z fenner $
21 * $FreeBSD: head/contrib/tcpdump/print-sunrpc.c 66644 2000-10-05 02:49:49Z kris $
22 */
23
24#ifndef lint
25static const char rcsid[] =
26 "@(#) $Header: /tcpdump/master/tcpdump/print-sunrpc.c,v 1.29 1999/11/21 09:37:02 fenner Exp $ (LBL)";
27#endif
28
29#ifdef HAVE_CONFIG_H

--- 97 unchanged lines hidden (view full) ---

127 static char buf[32];
128 static int lastprog = 0;
129
130 if (lastprog != 0 && prog == lastprog)
131 return (buf);
132 rp = getrpcbynumber(prog);
133 if (rp == NULL)
134 (void) sprintf(buf, "#%u", prog);
22 */
23
24#ifndef lint
25static const char rcsid[] =
26 "@(#) $Header: /tcpdump/master/tcpdump/print-sunrpc.c,v 1.29 1999/11/21 09:37:02 fenner Exp $ (LBL)";
27#endif
28
29#ifdef HAVE_CONFIG_H

--- 97 unchanged lines hidden (view full) ---

127 static char buf[32];
128 static int lastprog = 0;
129
130 if (lastprog != 0 && prog == lastprog)
131 return (buf);
132 rp = getrpcbynumber(prog);
133 if (rp == NULL)
134 (void) sprintf(buf, "#%u", prog);
135 else
136 strcpy(buf, rp->r_name);
135 else {
136 strncpy(buf, rp->r_name, sizeof(buf)-1);
137 buf[sizeof(buf)-1] = '\0';
138 }
137 return (buf);
138}
139 return (buf);
140}