Commit 6bdf1ae4 authored by Bernhard Link's avatar Bernhard Link

encapsulated mprintf usage a bit more

parent f9a13a13
......@@ -23,7 +23,7 @@
#include <stdio.h>
#include <malloc.h>
#include "error.h"
#include "mprintf.h"
#include "names.h"
#include "chunks.h"
#include "packages.h"
#include "binaries.h"
......@@ -65,7 +65,7 @@ retvalue binaries_parse_chunk(const char *chunk,char **packagename,char **source
free(pmd5);
return r;
}
md5andsize = mprintf("%s %s",pmd5,psize);
md5andsize = calc_concatmd5andsize(pmd5,psize);
free(pmd5);free(psize);
if( !md5andsize ) {
free(ppackage);
......
......@@ -30,7 +30,6 @@
#include <zlib.h>
#include <db.h>
#include "error.h"
#include "mprintf.h"
#include "md5sum.h"
#include "names.h"
#include "chunks.h"
......
......@@ -28,7 +28,6 @@
#include <malloc.h>
#include <zlib.h>
#include "error.h"
#include "mprintf.h"
#include "md5sum.h"
#include "chunks.h"
#include "checkindsc.h"
......
......@@ -24,7 +24,6 @@
#include <zlib.h>
#include <assert.h>
#include "error.h"
#include "mprintf.h"
#include "chunks.h"
extern int verbose;
......
......@@ -29,7 +29,6 @@
#include <zlib.h>
#include <db.h>
#include "error.h"
#include "mprintf.h"
#include "chunks.h"
#include "packages.h"
#include "sources.h"
......
......@@ -28,7 +28,6 @@
#include <malloc.h>
#include <zlib.h>
#include "error.h"
#include "mprintf.h"
#include "md5sum.h"
#include "chunks.h"
#include "extractcontrol.h"
......
......@@ -73,3 +73,9 @@ char *calc_filekey(const char *component,const char *sourcename,const char *file
char *calc_package_basename(const char *name,const char *version,const char *arch) {
return mprintf("%s_%s_%s.deb",name,version,arch);
}
char *calc_concatmd5andsize(const char *md5sum,const char *size) {
/* this is not the only reference, as there are prints
* with size as ofs_t, too */
return mprintf("%s %s",md5sum,size);
}
......@@ -10,5 +10,6 @@ char *calc_srcfilekey(const char *sourcedir,const char *filename);
char *calc_fullfilename(const char *mirrordir,const char *filekey);
char *calc_fullsrcfilename(const char *mirrordir,const char *directory,const char *filename);
char *calc_identifier(const char *codename,const char *component,const char *architecture);
char *calc_concatmd5andsize(const char *md5sum,const char *size);
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment