From 25261df09d801d070df4c31e11e1702614546090 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Wed, 8 May 2013 12:00:00 +0200 Subject: Remove an unused error code and unusued RSE_MAX. Also, remove unused file attr.c. --- lib/attr.c | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) delete mode 100644 lib/attr.c (limited to 'lib/attr.c') diff --git a/lib/attr.c b/lib/attr.c deleted file mode 100644 index 74d352c..0000000 --- a/lib/attr.c +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright 2010, 2011 NORDUnet A/S. All rights reserved. - See LICENSE for licensing information. */ - -/* NOTE: This file is not in use at the moment (libradsec-0.0.1). */ - -#if defined HAVE_CONFIG_H -#include -#endif - -#include -#include -#include - -int -rs_attr_create(struct rs_connection *conn, - struct rs_attr **attr, - const char *type, - const char *val) -{ - VALUE_PAIR *vp; - struct rs_attr *a; - - *attr = NULL; - a = (struct rs_attr *) malloc (sizeof(struct rs_attr)); - if (!a) - return rs_err_conn_push_fl (conn, RSE_NOMEM, __FILE__, __LINE__, NULL); - memset (a, 0, sizeof(struct rs_attr)); - - vp = pairmake (type, val, T_OP_EQ); - if (!vp) - { - rs_attr_destroy (a); - return rs_err_conn_push_fl (conn, RSE_FR, __FILE__, __LINE__, - "pairmake: %s", fr_strerror ()); - } - - a->vp = vp; - *attr = a; - return RSE_OK; -} - -void -rs_attr_destroy (struct rs_attr *attr) -{ - if (attr->vp) - pairfree (&attr->vp); - free (attr); -} -- cgit v1.1