]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/contrib/cdromutl.cc
do not change protected packages in autoinstall (Closes: #618848)
[apt.git] / apt-pkg / contrib / cdromutl.cc
index cf1c0c29bf02edaa476988f680f029701892df00..83c324f543bfdadf035ef21dda531eb2c49a41e1 100644 (file)
@@ -237,7 +237,7 @@ bool IdentCdrom(string CD,string &Res,unsigned int Version)
                                                                        /*}}}*/
 
 // FindMountPointForDevice - Find mountpoint for the given device      /*{{{*/
                                                                        /*}}}*/
 
 // FindMountPointForDevice - Find mountpoint for the given device      /*{{{*/
-char* FindMountPointForDevice(const char *devnode)
+string FindMountPointForDevice(const char *devnode)
 {
    char buf[255];
    char *out[10];
 {
    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))
          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);
       }
    }
    
             }
          }
          fclose(f);
       }
    }
    
-   return NULL;
+   return string();
 }
 
 
 }