~mrooney/ecryptfs/nautilus-integration

« back to all changes in this revision

Viewing changes to src/libecryptfs/cipher_list.c

  • Committer: Dustin Kirkland
  • Date: 2009-02-03 08:18:53 UTC
  • Revision ID: git-v1:b0090ac8d4f626339d7f8ca5681934d5e68dac3e
make most of the code compatible with -Werror

Thanks to Michal Hlavinka for the patch.  This has been on my
to-do list for a while now!

Patch retrieved from:
https://bugzilla.redhat.com/show_bug.cgi?id=479762

Signed-off-by: Dustin Kirkland <kirkland@canonical.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 * 02111-1307, USA.
21
21
 */
22
22
 
 
23
#include "config.h"
23
24
#include <dirent.h>
24
25
#include <stdlib.h>
25
26
#include <string.h>
35
36
#include <sys/types.h>
36
37
#include <sys/utsname.h>
37
38
#endif
38
 
#include "config.h"
39
39
#include "../include/ecryptfs.h"
40
40
 
41
41
#define MAX_BUF_LEN 128
57
57
        }
58
58
        while ((mntent = getmntent(fp)))
59
59
                if (strcmp(mntent->mnt_type, "proc") == 0) {
60
 
                        asprintf(proc_mount_point, "%s", mntent->mnt_dir);
61
60
                        fclose(fp);
 
61
                        if (asprintf(proc_mount_point, "%s", 
 
62
                                     mntent->mnt_dir) == -1)
 
63
                                rc = -ENOMEM;
62
64
                        goto out;
63
65
                }
64
66
        rc = -EINVAL;