diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2011-03-09 12:15:13 +0100 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2011-03-09 12:15:13 +0100 |
commit | 02aa6f67360bbd8f15c29fb0701badda99fc8c75 (patch) | |
tree | c6c8c614e050c83fb7e4637f2e1b6e05caf717ab /apt-pkg/contrib/cdromutl.cc | |
parent | f4c4a24ea1cd8711c186c1c60b43f0bf0bc8af10 (diff) |
apt-pkg/contrib/cdromutl.{cc,h}: return string for mountpath; apt-pkg/cdrom.cc: use string
Diffstat (limited to 'apt-pkg/contrib/cdromutl.cc')
-rw-r--r-- | apt-pkg/contrib/cdromutl.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apt-pkg/contrib/cdromutl.cc b/apt-pkg/contrib/cdromutl.cc index cf1c0c29b..83c324f54 100644 --- a/apt-pkg/contrib/cdromutl.cc +++ b/apt-pkg/contrib/cdromutl.cc @@ -237,7 +237,7 @@ bool IdentCdrom(string CD,string &Res,unsigned int Version) /*}}}*/ // FindMountPointForDevice - Find mountpoint for the given device /*{{{*/ -char* FindMountPointForDevice(const char *devnode) +string FindMountPointForDevice(const char *devnode) { char buf[255]; char *out[10]; @@ -254,14 +254,14 @@ char* FindMountPointForDevice(const char *devnode) while ( fgets(buf, sizeof(buf), f) != NULL) { if (strncmp(buf, devnode, strlen(devnode)) == 0) { if(TokSplitString(' ', buf, out, 10)) - return strdup(out[1]); + return string(out[1]); } } fclose(f); } } - return NULL; + return string(); } |