File: strerror.c

package info (click to toggle)
trueprint 5.3-4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny, squeeze, wheezy
  • size: 1,744 kB
  • ctags: 728
  • sloc: ansic: 8,296; sh: 1,225; makefile: 138
file content (20 lines) | stat: -rw-r--r-- 343 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/***********************************************************************
 * strerror
 * Returns an informative message on system call failure.  Normally
 * supplied by the system.
 */

#include "src/utils.h"

char *strerror(int errnum)
{
  static char *b = 0;

  if (!b)
    b = xmalloc(15);

  sprintf(b,"errno = %d",errnum);

  return b;
}