[zypp-commit] r7997 - /trunk/sat-solver/testsuite/deptestomatic.c
Author: schubi2 Date: Fri Nov 30 17:07:48 2007 New Revision: 7997 URL: http://svn.opensuse.org/viewcvs/zypp?rev=7997&view=rev Log: fixes for new c-compiler Modified: trunk/sat-solver/testsuite/deptestomatic.c Modified: trunk/sat-solver/testsuite/deptestomatic.c URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/testsuite/deptestomatic.c?rev=7997&r1=7996&r2=7997&view=diff ============================================================================== --- trunk/sat-solver/testsuite/deptestomatic.c (original) +++ trunk/sat-solver/testsuite/deptestomatic.c Fri Nov 30 17:07:48 2007 @@ -668,7 +668,7 @@ } strcpy(locale, "language:"); - strncat(locale, name, MAXNAMELEN); + strncat(locale, name, MAXNAMELEN-sizeof("language:")); id = str2id(pool, locale, 1); /* check if we already have that one */ @@ -782,8 +782,7 @@ if (file) { char path[PATH_MAX]; - strncpy(path, pd->directory, sizeof(path)); - strncat(path, file, sizeof(path)); + snprintf(path, sizeof(path), "%s%s", pd->directory, file); if (!name) name = file; @@ -829,8 +828,7 @@ if (file) { char path[PATH_MAX]; - strncpy(path, pd->directory, sizeof(path)); - strncat(path, file, sizeof(path)); + snprintf(path, sizeof(path), "%s%s", pd->directory, file); Repo *repo = add_repo( pd, "system", path ); if (repo) pd->system = repo; @@ -976,8 +974,7 @@ if (dir) { char path[PATH_MAX]; - strncpy(path, pd->directory, sizeof(path)); - strncat(path, dir, sizeof(path)); + snprintf(path, sizeof(path), "%s%s", pd->directory, dir); pd->hardwareinfo = strdup(path); printf("Setting hardwareinfo to %s\n", path); } -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org
participants (1)
-
schubi2@svn.opensuse.org