~clint-fewbar/ubuntu/precise/squid3/ignore-sighup-early

« back to all changes in this revision

Viewing changes to snmplib/snmp_api_error.c

  • Committer: Bazaar Package Importer
  • Author(s): Luigi Gangitano
  • Date: 2010-05-04 11:15:49 UTC
  • mfrom: (1.3.1 upstream)
  • mto: (20.3.1 squeeze) (21.2.1 sid)
  • mto: This revision was merged to the branch mainline in revision 21.
  • Revision ID: james.westby@ubuntu.com-20100504111549-1apjh2g5sndki4te
Tags: upstream-3.1.3
ImportĀ upstreamĀ versionĀ 3.1.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
/***************************************************************************
8
8
 *
9
9
 *           Copyright 1997 by Carnegie Mellon University
10
 
 * 
 
10
 *
11
11
 *                       All Rights Reserved
12
 
 * 
 
12
 *
13
13
 * Permission to use, copy, modify, and distribute this software and its
14
14
 * documentation for any purpose and without fee is hereby granted,
15
15
 * provided that the above copyright notice appear in all copies and that
17
17
 * supporting documentation, and that the name of CMU not be
18
18
 * used in advertising or publicity pertaining to distribution of the
19
19
 * software without specific, written prior permission.
20
 
 * 
 
20
 *
21
21
 * CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
22
22
 * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
23
23
 * CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
25
25
 * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
26
26
 * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
27
27
 * SOFTWARE.
28
 
 * 
 
28
 *
29
29
 * Author: Ryan Troll <ryan+@andrew.cmu.edu>
30
 
 * 
 
30
 *
31
31
 ***************************************************************************/
32
32
 
33
33
#ifdef HAVE_CONFIG_H
44
44
 
45
45
int snmp_errno = 0;
46
46
 
47
 
static const char *api_errors[17] =
48
 
{
 
47
static const char *api_errors[17] = {
49
48
    "Unknown Error",
50
49
    "Generic Error",
51
50
    "Invalid local port",
80
79
{
81
80
    int foo = (err * -1);
82
81
    if ((foo < SNMPERR_GENERR) ||
83
 
        (foo > SNMPERR_LAST))
84
 
        foo = 0;
 
82
            (foo > SNMPERR_LAST))
 
83
        foo = 0;
85
84
 
86
85
    return (api_errors[foo]);
87
86
}