~ubuntu-branches/ubuntu/raring/shadow/raring-proposed

« back to all changes in this revision

Viewing changes to libmisc/basename.c

  • Committer: Bazaar Package Importer
  • Author(s): Oliver Grawert
  • Date: 2010-11-24 13:42:42 UTC
  • mfrom: (1.1.9 upstream) (18.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20101124134242-832f4tew5s81ntj7
Tags: 1:4.1.4.2+svn3283-2ubuntu1
* Merge from debian unstable.  Remaining changes:
  - Ubuntu specific:
    + debian/login.defs: use SHA512 by default for password crypt routine.
  - debian/{source_shadow.py,rules}: Add apport hook
  - debian/rules: fix FTBFS from newer libtools
  - debian/patches/495_stdout-encrypted-password: chpasswd can report
    password hashes on stdout (Debian bug 505640).
  - Rework 495_stdout-encrypted-password to cope with chpasswd using PAM.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
 
39
39
#include <config.h>
40
40
 
41
 
#ident "$Id: basename.c 1980 2008-04-27 00:40:09Z nekral-guest $"
 
41
#ident "$Id: basename.c 3232 2010-08-22 19:13:53Z nekral-guest $"
42
42
 
43
43
#include "defines.h"
44
44
#include "prototypes.h"
45
 
char *Basename (char *str)
 
45
/*@observer@*/const char *Basename (char *str)
46
46
{
47
47
        char *cp = strrchr (str, '/');
48
48
 
49
 
        return cp ? cp + 1 : str;
 
49
        return (NULL != cp) ? cp + 1 : str;
50
50
}