File: misc.c

package info (click to toggle)
pwdb 0.54preD-3
  • links: PTS
  • area: main
  • in suites: hamm, slink
  • size: 644 kB
  • ctags: 797
  • sloc: ansic: 8,459; makefile: 346; sh: 204
file content (24 lines) | stat: -rw-r--r-- 353 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
 * $Id$
 *
 * $Log$
 */

/*
 * this is the enevitable file that contains all the utility things that
 * are needed by the library
 */

#include "../_pwdb_internal.h"

char *__pwdb_strdup(const char *x)
{
     if (x != NULL) {
	  char *s = (char *) malloc(strlen(x)+1);
	  if (s) {
	       strcpy(s,x);
	  }
	  return s;
     } else
	  return NULL;
}