Back to index

glibc  2.9
nis_free.c
Go to the documentation of this file.
00001 /* Copyright (c) 1997, 1998, 2004 Free Software Foundation, Inc.
00002    This file is part of the GNU C Library.
00003    Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
00004 
00005    The GNU C Library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Lesser General Public
00007    License as published by the Free Software Foundation; either
00008    version 2.1 of the License, or (at your option) any later version.
00009 
00010    The GNU C Library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Lesser General Public License for more details.
00014 
00015    You should have received a copy of the GNU Lesser General Public
00016    License along with the GNU C Library; if not, write to the Free
00017    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00018    02111-1307 USA.  */
00019 
00020 #include <rpcsvc/nis.h>
00021 #include "nis_xdr.h"
00022 
00023 void
00024 __free_fdresult (fd_result *res)
00025 {
00026   if (res != NULL)
00027     {
00028       xdr_free ((xdrproc_t)_xdr_fd_result, (char *)res);
00029       free (res);
00030     }
00031 }
00032 libnsl_hidden_def (__free_fdresult)
00033 
00034 void
00035 nis_free_request (ib_request *ibreq)
00036 {
00037   if (ibreq != NULL)
00038     {
00039       xdr_free ((xdrproc_t)_xdr_ib_request, (char *)ibreq);
00040       free (ibreq);
00041     }
00042 }
00043 libnsl_hidden_def (nis_free_request)
00044 
00045 void
00046 nis_free_directory (directory_obj *obj)
00047 {
00048   if (obj != NULL)
00049     {
00050       xdr_free ((xdrproc_t)_xdr_directory_obj, (char *)obj);
00051       free (obj);
00052     }
00053 }
00054 libnsl_hidden_def (nis_free_directory)
00055 
00056 void
00057 nis_free_object (nis_object *obj)
00058 {
00059   if (obj != NULL)
00060     {
00061       xdr_free ((xdrproc_t)_xdr_nis_object, (char *)obj);
00062       free (obj);
00063     }
00064 }
00065 libnsl_hidden_def (nis_free_object)
00066 
00067 void
00068 nis_freeresult (nis_result *res)
00069 {
00070   if (res != NULL)
00071     {
00072       xdr_free ((xdrproc_t)_xdr_nis_result, (char *)res);
00073       free (res);
00074     }
00075 }
00076 libnsl_hidden_def (nis_freeresult)